-
Notifications
You must be signed in to change notification settings - Fork 4
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
AttributeError: 'module' object has no attribute 'pa_sink #10
Comments
I'll check it. |
Could you please tell me more about your environment and how you installed the package? I have no idea why it might have happened. |
There's a few issues. I am encountering this on Raspian 10. First, the library is being installed as /usr/local/lib/libgnuradio-pulseaudio.so:
...but, it's not being permissioned correctly:
You need to run But, this isn't enough. The swig binary still couldn't resolve it:
More to the point, ctypes doesn't seem to be respecting the system library resolution path:
So, I tried exporting
That fixed the import. I'd recommend adding that to your user-profile script. Make sure to log out and log back in if you're in X. Finally, this obscured all of the issues (in init.py):
I'm not sure why you're unconditionally suppressing all import issues. Once I removed the guards, I started seeing:
I'd also recommend that you get rid of this flow (in pulseaudio_swig.py):
There are three variations of this. The first import should never fail under normal circumstances. If you have something configured incorrectly on your system, it will just fail over to the second import, which is likely to fail (unless you're running from inside that package path) and then print a message that cites an unhelpful error message rather than the proper error message. |
Note that I needed to set |
You're right that there's lots of ugly code in there, but interestingly I couldn't reproduce the problem in clean Debian 10 container. I'll try to clean up what you suggested anyway. |
Besides, since my distro (Gentoo) already moved on, and removed Python 2 support from lots of packages, including GNU Radio, I'll need to add Python 3 support anyway, and it would be hard without cleaning up first. |
Are you sure libraries must have executable bit set, though? I checked various Linux systems I have access to, including Rasbpian Stretch, and vast majority of libraries on every system was non-executable. Compare https://www.debian.org/doc/debian-policy/ch-sharedlibs.html
|
Oh, well, apparently, most of the crap simply comes from default |
after installing this module, this error occurred when executing the flow graph
top_block.py", line 99, in init
self.pulseaudio_pa_sink_0 = gr_pulseaudio.pa_sink(
AttributeError: 'module' object has no attribute 'pa_sink
The text was updated successfully, but these errors were encountered: