Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctypes.ArgumentError: argument 1: <type 'exceptions.OverflowError'>: long int too long to convert #1

Open
zamora18 opened this issue Mar 30, 2018 · 0 comments

Comments

@zamora18
Copy link

Hello,
I am using a Symbol LS2208 barcode scanner and trying to read the data from it using python. I downloaded your package, and attempted to use your script to connect to it but I ran into this error:
ctypes.ArgumentError: argument 1: <type 'exceptions.OverflowError'>: long int too long to convert

For reference, here is the entire Traceback to the error:

Traceback (most recent call last):
  File "C:/Users/PycharmProjects/practice_project/LS2208-USB-Barcode-Scanner-master/test.py", line 6, in <module>
    scanners = get_scanners()
  File "C:\Users\PycharmProjects\practice_project\LS2208-USB-Barcode-Scanner-master\scanner.py", line 53, in get_scanners
    targets = HID.OpenDevices(VENDORID,PRODUCTID)
  File "C:\Users\PycharmProjects\practice_project\LS2208-USB-Barcode-Scanner-master\HID.py", line 162, in OpenDevices
    temp = HIDDevice(handle)
  File "C:\Users\PycharmProjects\practice_project\LS2208-USB-Barcode-Scanner-master\HID.py", line 191, in __init__
    self.connect()
  File "C:\Users\PycharmProjects\practice_project\LS2208-USB-Barcode-Scanner-master\HID.py", line 202, in connect
    hid.HidD_GetAttributes(self.handle,byref(attrib))
ctypes.ArgumentError: argument 1: <type 'exceptions.OverflowError'>: long int too long to convert

I know this package is old and only tested in python 2.5. I am using 2.7 (on Windows 10) and perhaps this is a compatibility issue? When looping through every HID device it can't get past the first one because of this issue.

I would really appreciate any help, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant