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

New install one, can't work ? #10

Open
jinyistudio534 opened this issue Apr 18, 2024 · 2 comments
Open

New install one, can't work ? #10

jinyistudio534 opened this issue Apr 18, 2024 · 2 comments

Comments

@jinyistudio534
Copy link

jinyistudio534 commented Apr 18, 2024

Hi, I install new one(RPI4, python3.11).This message will appear as soon as I execute the program.
This program i can run in the old one(RPI3, python3.9). What problem do you think this might be ?

Exception in callback EtherCat.connection_made(<_SelectorDat...e, bufsize=0>>)
handle: <Handle EtherCat.connection_made(<_SelectorDat...e, bufsize=0>>)>
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/jinyistudio/python/ebpfcat/ebpfcat/lib/python3.11/site-packages/ebpfcat/ethercat.py", line 451, in connection_made
transport.get_extra_info("socket").bind(self.addr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TransportSocket' object has no attribute 'bind'
Exception in callback XDRFD.connection_made(<_SelectorDat...e, bufsize=0>>)
handle: <Handle XDRFD.connection_made(<_SelectorDat...e, bufsize=0>>)>
Traceback (most recent call last):
File "/usr/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/jinyistudio/python/ebpfcat/ebpfcat/lib/python3.11/site-packages/ebpfcat/xdp.py", line 61, in connection_made
sock.bind((0, 0))
^^^^^^^^^
AttributeError: 'TransportSocket' object has no attribute 'bind'

@tecki
Copy link
Owner

tecki commented Apr 18, 2024

you stumbled over a bug here. Newer versions of Python do not allow binding a socket the way I do it in that code. Interestingly, it also does not seem to be necessary at all. I just fixed it in master here on github. If you don't feel like using beta code, you can just delete the two lines that the error refers to, and everything should work (this is what I did).

@jinyistudio534
Copy link
Author

I acted a little faster. I have changed the PI4 system to be the same as PI3. The execution result is normal. Thank you, I will install the new version another day and give it a try. 😅😅😅

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

2 participants