This forum is now just an archive. Use the new Q&A website
It is currently Sun Apr 20, 2014 11:31 pm

All times are UTC + 2 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: centos 5 help - ImportError: No module named _thread
PostPosted: Sun Oct 02, 2011 1:28 pm 
Offline

Joined: Sun Oct 02, 2011 1:19 pm
Posts: 1
Hi,

I have been trying to setup openERP on my centos5 box. I have managed to get it working with the DB etc so i can login using the client , but I keep getting this error when trying to install any module:

Code:
[2011-10-02 12:13:58,273][erp] CRITICAL:init:Couldn't load module base_calendar
[2011-10-02 12:13:58,274][erp] CRITICAL:init:No module named _thread
[2011-10-02 12:13:58,274][erp] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.6/site-packages/openerp-server/addons/base/module/wizard/base_module_upgrade.py", line 98, in upgrade_module
    _db, pool = pooler.restart_pool(cr.dbname, update_module=True)
  File "/usr/lib/python2.6/site-packages/openerp-server/pooler.py", line 60, in restart_pool
    return get_db_and_pool(db_name, force_demo, status, update_module=update_module)
  File "/usr/lib/python2.6/site-packages/openerp-server/pooler.py", line 39, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/lib/python2.6/site-packages/openerp-server/addons/__init__.py", line 883, in load_modules
    processed_modules.extend(load_module_graph(cr, graph, status, report=report, skip_modules=processed_modules))
  File "/usr/lib/python2.6/site-packages/openerp-server/addons/__init__.py", line 716, in load_module_graph
    register_class(package.name)
  File "/usr/lib/python2.6/site-packages/openerp-server/addons/__init__.py", line 450, in register_class
    imp.load_module(m, *fm)
  File "/usr/lib/python2.6/site-packages/openerp-server/addons/base_calendar/__init__.py", line 22, in <module>
    import base_calendar
  File "/usr/lib/python2.6/site-packages/openerp-server/addons/base_calendar/base_calendar.py", line 24, in <module>
    from dateutil import rrule
  File "/usr/lib/python2.6/site-packages/python_dateutil-2.0-py2.6.egg/dateutil/rrule.py", line 13, in <module>
    import _thread
ImportError: No module named _thread


I have tried everything but just can't seem to fix it.. does base_calendar have any python dependacies or has anyone seen this error before? I'm using python 2.6 - openerp-server-6.0.3

Thanks


Top
 Profile  
 
 Post subject: Re: centos 5 help - ImportError: No module named _thread
PostPosted: Wed Oct 12, 2011 10:39 am 
Offline

Joined: Wed Oct 12, 2011 10:37 am
Posts: 1
Location: Brussels
I had the same problem.

in a terminal :

sudo easy_install -m python-dateutil
sudo easy_install python-dateutil==1.5


And it will work :)


Top
 Profile  
 
 Post subject: Re: centos 5 help - ImportError: No module named _thread
PostPosted: Thu Oct 13, 2011 9:56 pm 
Offline

Joined: Thu Oct 13, 2011 8:56 pm
Posts: 1
Location: Finland
I am having similar problem and dateutils were not solution to me. I tried it, but still I got the _thread error.

After looking after the package, it seems that in openSUSE (platform that I am using) I have thread-module, but it is not in the same folder than rrule.py is which is calling it. It seems that _thread is causing it. Perhaps there should be some additional software in this distro - but _thread is not there, nor python is able to use it from other location (/usr/lib/python2.7/threading.py) - perhaps due to the fact that my computer is a ... test environment that has several installations... Not a production server for sure :)

I thought that I will try to change that rrule.py by removing the "_" from "_thread". It helped at least in the installation - that I managed to do - great :)

In the future, I think most problematic with openSUSE will be the variety and amount of different python libraries that needs to exist and this are NOT delivered as one easy installable package.

I AM NOT an software developer nor expert, hence my SW comments might seem quite silly - sorry :)


Top
 Profile  
 
 Post subject: Re: centos 5 help - ImportError: No module named _thread
PostPosted: Wed Dec 21, 2011 4:42 pm 
Offline

Joined: Thu Dec 15, 2011 7:54 pm
Posts: 1
Location: Egypt
I had the same problem, and thank you JeromeM your solution worked with me too.

in a terminal :

sudo easy_install -m python-dateutil
sudo easy_install python-dateutil==1.5

:D


Top
 Profile  
 
 Post subject: Re: centos 5 help - ImportError: No module named _thread
PostPosted: Wed Mar 21, 2012 1:37 am 
Offline

Joined: Wed Mar 21, 2012 1:29 am
Posts: 1
Hello you guys ,
Iam having the same error messages but it did not work with the solution that you posted here.
everything was working well but i restarted the server and when i tried to log in it does not allow me , and then check the --debug and iam getting this message.
[2012-03-20 21:31:00,573][superamesoluciones] INFO:init:module base: loading objects
[2012-03-20 21:31:00,574][superamesoluciones] INFO:init:module base: registering objects
[2012-03-20 21:31:01,918][superamesoluciones] INFO:init:module base: loading objects
[2012-03-20 21:31:01,965][superamesoluciones] INFO:init:module knowledge: loading objects
[2012-03-20 21:31:01,966][superamesoluciones] INFO:init:module knowledge: registering objects
[2012-03-20 21:31:01,985][superamesoluciones] INFO:init:module board: loading objects
[2012-03-20 21:31:01,985][superamesoluciones] INFO:init:module board: registering objects
[2012-03-20 21:31:02,016][superamesoluciones] INFO:init:module base_tools: loading objects
[2012-03-20 21:31:02,016][superamesoluciones] INFO:init:module base_tools: registering objects
[2012-03-20 21:31:02,024][superamesoluciones] INFO:init:module base_report_designer: loading objects
[2012-03-20 21:31:02,025][superamesoluciones] INFO:init:module base_report_designer: registering objects
[2012-03-20 21:31:02,054][superamesoluciones] INFO:init:module base_calendar: loading objects
[2012-03-20 21:31:02,054][superamesoluciones] INFO:init:module base_calendar: registering objects
[2012-03-20 21:31:02,132][superamesoluciones] CRITICAL:init:Couldn't load module base_calendar
[2012-03-20 21:31:02,132][superamesoluciones] CRITICAL:init:No module named _thread
> /usr/lib/python2.6/site-packages/python_dateutil-2.0-py2.6.egg/dateutil/rrule.py(13)<module>()
-> import _thread
(Pdb)

iam not able to log in even when i put the correct info, but i can create, drop databases, if i create a database iam able to log in for that new database.

any idea to solve this please.

Thank you so much ind advance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron

Protected by Anti-Spam ACP