tpfan-admin fails to start -- No module named tpfanadmin.globals

Bug #480700 reported by kishambo
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
tp-fan
New
Undecided
Unassigned

Bug Description

Hey,

First of all thanks a lot for the piece of software, i really appreciate your work.

Im having problems running tpfan-admin on my system. Im using Ubuntu 9.10 (Karmic Koala) with tpfan 0.94/0.95 taken from your wikipage.

The installation of the daemon went well, i didnt encounter any problems with that. Installing the tpfan-admin tool left me with this output (which should be normal?):

User@PC:~/tpfan-admin-0.95$ make install
./compile_po.sh
install -d //usr/lib/python2.5/site-packages/tpfanadmin
install src/tpfanadmin/* //usr/lib/python2.5/site-packages/tpfanadmin
install -d //usr/share/tpfan-admin/
install share/* //usr/share/tpfan-admin/
install -d //usr/bin
install wrappers/tpfan-admin //usr/bin/
install -d //usr/share/tpfan-admin/locales/
cp -av mo/* //usr/share/tpfan-admin/locales/
„mo/af/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/af/LC_MESSAGES/tpfan-admin.mo“
„mo/de/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/de/LC_MESSAGES/tpfan-admin.mo“
„mo/es/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/es/LC_MESSAGES/tpfan-admin.mo“
„mo/fr/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/fr/LC_MESSAGES/tpfan-admin.mo“
„mo/gl/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/gl/LC_MESSAGES/tpfan-admin.mo“
„mo/he/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/he/LC_MESSAGES/tpfan-admin.mo“
„mo/it/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/it/LC_MESSAGES/tpfan-admin.mo“
„mo/pt_BR/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/pt_BR/LC_MESSAGES/tpfan-admin.mo“
„mo/sv/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/sv/LC_MESSAGES/tpfan-admin.mo“
„mo/zh_CN/LC_MESSAGES/tpfan-admin.mo“ -> „//usr/share/tpfan-admin/locales/zh_CN/LC_MESSAGES/tpfan-admin.mo“
install -d //usr/share/applications
install -m 755 share/tpfan-admin.desktop //usr/share/applications

When i try to run the program i get:

User@PC:~$ tpfan-admin
Traceback (most recent call last):
  File "/usr/bin/tpfan-admin", line 21, in <module>
    import tpfanadmin.globals
ImportError: No module named tpfanadmin.globals

All Python Dependencies should be installed. Any help would be highly appreciated.

Thanks a lot and greetings from Germany ;)

Paul

Revision history for this message
Andrew Burcin (andrew-burcin) wrote :

I had the same problem when I tried to use source. I just found that the software from the 9.04 Jaunty repositories works fine under 9.10.

I made sure that I removed all traces of the old, failed install and installed from the 9.04 PPA.

Revision history for this message
vipzrx (vipzrx) wrote :

I had the same probiem when I tried to use source.I just found that

sunnux@sunnux-laptop:~/Desktop/tpfan-admin-0.96$ sudo make install
[sudo] password for sunnux:
./compile_po.sh
install -d //usr/lib/python2.5/site-packages/tpfanadmin
install -m 644 src/tpfanadmin/* //usr/lib/python2.5/site-packages/tpfanadmin
install -d //usr/share/tpfan-admin/
install -m 644 share/* //usr/share/tpfan-admin/
install -d //usr/bin
install -m 755 wrappers/tpfan-admin //usr/bin/
install -d //usr/share/tpfan-admin/locales/
cp -av mo/* //usr/share/tpfan-admin/locales/
`mo/af/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/af/LC_MESSAGES/tpfan-admin.mo'
`mo/de/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/de/LC_MESSAGES/tpfan-admin.mo'
`mo/es/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/es/LC_MESSAGES/tpfan-admin.mo'
`mo/fr/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/fr/LC_MESSAGES/tpfan-admin.mo'
`mo/gl/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/gl/LC_MESSAGES/tpfan-admin.mo'
`mo/he/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/he/LC_MESSAGES/tpfan-admin.mo'
`mo/it/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/it/LC_MESSAGES/tpfan-admin.mo'
`mo/pt_BR/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/pt_BR/LC_MESSAGES/tpfan-admin.mo'
`mo/sv/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/sv/LC_MESSAGES/tpfan-admin.mo'
`mo/zh_CN/LC_MESSAGES/tpfan-admin.mo' -> `//usr/share/tpfan-admin/locales/zh_CN/LC_MESSAGES/tpfan-admin.mo'
install -d //usr/share/applications
install -m 644 share/tpfan-admin.desktop //usr/share/applications
sunnux@sunnux-laptop:~/Desktop/tpfan-admin-0.96$ tpfan-admin
Traceback (most recent call last):
  File "/usr/bin/tpfan-admin", line 21, in <module>
    import tpfanadmin.globals
ImportError: No module named tpfanadmin.globals

T60p

ubuntu 10.04

Revision history for this message
sendney (sendney2002) wrote :

I install this software in ubuntu 10.04, and also meet this problem.

  File "/usr/bin/tpfan-admin", line 21, in <module>
    import tpfanadmin.globals
ImportError: No module named tpfanadmin.globals

Revision history for this message
Abraxa (abraxa) wrote :

I noticed that the makefile is hardcoded to install the packages into /usr/lib/python2.5/site-packages/.
As I run python2.6, this is incorrect and so I created patches to make the makefile adaptive.

Revision history for this message
Abraxa (abraxa) wrote :
Revision history for this message
Andrew Burcin (andrew-burcin) wrote :

The patch applies correctly, but after trying to start I get:

# /etc/init.d/tpfand start
 * Starting ThinkPad fan control daemon tpfand Traceback (most recent call last):
  File "/usr/sbin/tpfand", line 21, in <module>
    import tpfand.control
ImportError: No module named tpfand.control

Abraxa, have you gotten this to work properly on 10.04?
It would be great if the PPA owner would update this repository, he made a very useful piece of software...

Revision history for this message
Abraxa (abraxa) wrote :

You might have forgotten to apply the second patch as they're both required: one for tpfand, one for tpfan-admin. Also, after applying the patches you need to run "make install" on both so that the python files are copied into the proper locations.

If that still doesn't work for you then please let me know.

Revision history for this message
Andrew Burcin (andrew-burcin) wrote :

I downloaded the two source tarballs, patched and ran 'make install' as root. I would expect the daemon should be able to run without the admin interface but I installed both in case there might be some dependencies. Still same error.

Revision history for this message
Marty (martypoulin) wrote :

The "ImportError" is a result of Python 2.6 changing the behavior of site-packages:

   http://docs.python.org/dev/whatsnew/2.6.html#pep-370-per-user-site-packages-directory

As a work around I moved the tpfan* directories up to the python2.6 directory.

Revision history for this message
Michael A. Phillips (maphilli14) wrote :

What is involved in "As a work around I moved the tpfan* directories up to the python2.6 directory."

doesn't seem as simple as:

[root] mv site-packages ../python2.7/

Mike

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.