Skip to content

Error when trying to initialize isCAN dongle #1292

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

Closed
Jeffmagma opened this issue Apr 14, 2022 · 4 comments · Fixed by #1293
Closed

Error when trying to initialize isCAN dongle #1292

Jeffmagma opened this issue Apr 14, 2022 · 4 comments · Fixed by #1293
Labels

Comments

@Jeffmagma
Copy link

Describe the bug

When I try to set up the isCAN bus the same way I did with PCAN (tested and working for me), I get an error:

File "C:\Users\Jeffmagma\Documents\pythontest.py", line 182, in <module>
    main()
  File "C:\Users\Jeffmagma\Documents\pythontest.py", line 168, in main
    bus = can.Bus(interface='iscan', bitrate=250000, channel=0)
  File "C:\Users\Jeffmagma\AppData\Roaming\Python\Python39\site-packages\can\interface.py", line 120, in __new__
    bus = cls(channel, *args, **kwargs)
  File "C:\Users\Jeffmagma\AppData\Roaming\Python\Python39\site-packages\can\interfaces\iscan.py", line 106, in __init__
    iscan.isCAN_DeviceInitEx(self.channel, self.BAUDRATES[bitrate])
  File "C:\Users\Jeffmagma\AppData\Roaming\Python\Python39\site-packages\can\interfaces\iscan.py", line 35, in check_status_initialization
    raise IscanInitializationError(function, result, arguments)
  File "C:\Users\Jeffmagma\AppData\Roaming\Python\Python39\site-packages\can\interfaces\iscan.py", line 195, in __init__
    f"Function {self.function.__name__} failed{description}",
AttributeError: 'IscanInitializationError' object has no attribute 'function'

To Reproduce

This can be reproduced with the simple python code:

import can
bus = can.Bus(interface='iscan', channel=0)

Expected behavior

I expect the error not to occur and my program to continue to run as usual

Additional context

OS and version: Windows 10 21H2
Python version: 3.10
python-can version: 4.0.0
python-can interface/s (if applicable): working with PCAN, not working with isCAN

Traceback and logs
def func():
    return "hello, world!"
@Jeffmagma Jeffmagma added the bug label Apr 14, 2022
zariiii9003 added a commit to zariiii9003/python-can that referenced this issue Apr 15, 2022
@zariiii9003
Copy link
Collaborator

Can you try again with this branch? https://github.com/zariiii9003/python-can/tree/fix_1292
You should get a meaningful error message now.

@Jeffmagma
Copy link
Author

Seems like that fixed the issue, thanks

@Jeffmagma
Copy link
Author

Is there a forum or chat for this library? I have a question but don't know where to ask it. I just want to know how to get the source address that python-can uses to send its messages

zariiii9003 added a commit that referenced this issue Apr 20, 2022
@zariiii9003
Copy link
Collaborator

There is this mailing list: https://groups.google.com/g/python-can
But you can also create a new issue here.

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

Successfully merging a pull request may close this issue.

2 participants