You are not logged in.

#1 2010-09-14 05:12:16

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

[SOLVED] mirrorbrain - python can't find module mb.geoip

I'm trying to get mirrorbrain up and running, but Python isn't liking me (and I'm not liking it!).

The PKGBUILD is OK; it builds and installs:
http://aur.archlinux.org/packages/mirro … n/PKGBUILD

But I get this error when I try to run the 'mb' Python script:

Traceback (most recent call last):
  File "/usr/bin/mb", line 24, in <module>
    import mb.geoip
  File "/usr/bin/mb.py", line 24, in <module>
ImportError: No module named geoip

And yet, the module is definitely there:

hydrogen ~ # ll /usr/lib/python2.6/site-packages/mb/geoip.py*
-rw-r--r-- 1 root root 2.2K Dec 22  2009 /usr/lib/python2.6/site-packages/mb/geoip.py
-rw-r--r-- 1 root root 2.6K Sep 14 13:04 /usr/lib/python2.6/site-packages/mb/geoip.pyc
-rw-r--r-- 1 root root 2.6K Sep 14 13:04 /usr/lib/python2.6/site-packages/mb/geoip.pyo

I know there are a few Python affectionados around the AL community so I'd love some assistance if anyone can see what I'm doing wrong?

Last edited by fukawi2 (2010-09-15 01:02:56)

Offline

#2 2010-09-15 01:02:41

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [SOLVED] mirrorbrain - python can't find module mb.geoip

Fixed this issue. Somehow there was an extra /usr/bin/mb.pyc file which must have accidentally gotten installed while I was building the PKGBUILD. This causes errors as explained by this comment in the mb setup.py file:

# Since the "mb" script has the same name as the Python module, it'd
# try to import itself as long as there's mb.py in the script's directory.
# Therefore, we remove mb.py and only leave mb.
# Don't know if there's a better way to achieve this...

Offline

Board footer

Powered by FluxBB