Trouble with importing
Jerry Hill
malaclypse2 at gmail.com
Tue Nov 2 17:01:41 EDT 2010
On Tue, Nov 2, 2010 at 3:33 PM, Ben Ahrens <bahrens at gmail.com> wrote:
> Jerry, thanks for the reply, I was swamped with other things for the
> better part of a week.. Anyway, I tried using the verbose flag when
> attempting the import. I didn't see anything that meant anything to
> me, but here's the bit surrounding the part where it fails:
>
> # /usr/lib/python2.6/dist-packages/gnuradio/__init__.pyc matches
> /usr/lib/python2.6/dist-packages/gnuradio/__init__.py
> import gnuradio # precompiled from
> /usr/lib/python2.6/dist-packages/gnuradio/__init__.pyc
> # /usr/lib/python2.6/re.pyc matches /usr/lib/python2.6/re.py
> import re # precompiled from /usr/lib/python2.6/re.pyc
> # /usr/lib/python2.6/sre_compile.pyc matches /usr/lib/python2.6/sre_compile.py
> import sre_compile # precompiled from /usr/lib/python2.6/sre_compile.pyc
> import _sre # builtin
> # /usr/lib/python2.6/sre_parse.pyc matches /usr/lib/python2.6/sre_parse.py
> import sre_parse # precompiled from /usr/lib/python2.6/sre_parse.pyc
> # /usr/lib/python2.6/sre_constants.pyc matches
> /usr/lib/python2.6/sre_constants.py
> import sre_constants # precompiled from /usr/lib/python2.6/sre_constants.pyc
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: cannot import name rfid
> # clear __builtin__._
> # clear sys.path
> # clear sys.argv
>
>
> As for the permissions, as a bit of a python novice, I wasn't sure
> whether permissions on the package referred to the gnuradio folder or
> to something else. The permissions on the gnuradio folder are
> drwxr-sr-x. I have sort of the same problem with the rfid module, but
> hopefully this gives you the info you were asking about:
>
> -rwxr-xr-x 1 root staff 1067 2010-10-14 15:27 _rfid.la
> -rw-r--r-- 1 root staff 17988 2010-10-14 15:27 rfid.py
> -rw-r--r-- 1 root staff 30771 2010-10-14 15:27 rfid.pyc
> -rw-r--r-- 1 root staff 30771 2010-10-14 15:27 rfid.pyo
> -rwxr-xr-x 1 root staff 939872 2010-10-14 15:27 _rfid.so
>
>
> Thanks again for giving this some thought. Let me know if you have
> any other tips!
I'm copying your reply back to the list. You'll get more and better
responses if you keep all of the discussion on there.
I don't see anything unusual going on there either. I do see that the
project page for gen2_rfid is asking for a particular SVN revision of
gnuradio with custom edits applied. Is that how you installed
gnuradio? I'm looking at the notes in
https://www.cgran.org/browser/projects/gen2_rfid/trunk/README.txt and
https://www.noisebridge.net/wiki/RFID_Hacking/usrp/
--
Jerry
More information about the Python-list
mailing list