[6.1 trunk] [crm_caldav,caldav] import error

Bug #922526 reported by Bogdan Stanciu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Unassigned

Bug Description

Hello,

I tryied to update a database with latest trunk server, client and addons.

unfortunatelly, the update /launch gives a critical error on initialising crm_caldav, due to another error in module caldav (apparently a naming issue)

here is the log:

[2012-01-27 10:51:00,339][bs_02] INFO:init.load:module crm_caldav: loading objects
[2012-01-27 10:51:00,339][bs_02] INFO:init:module crm_caldav: registering objects
[2012-01-27 10:51:00,357][bs_02] WARNING:init:
Ambiguous import: the OpenERP module `caldav` is shadowed by another
module (available at /usr/local/lib/python2.7/dist-packages/caldav-0.1.8-py2.7.egg/caldav).
To import it, use `import openerp.addons.<module>.`.
No LSB modules are available.
[2012-01-27 10:51:01,141][bs_02] CRITICAL:init:[01]:
[2012-01-27 10:51:01,142][bs_02] CRITICAL:init:[02]: Environment Information :
[2012-01-27 10:51:01,142][bs_02] CRITICAL:init:[03]: System : Linux-3.0.0-15-generic-i686-with-Ubuntu-11.10-oneiric
[2012-01-27 10:51:01,142][bs_02] CRITICAL:init:[04]: OS Name : posix
[2012-01-27 10:51:01,142][bs_02] CRITICAL:init:[05]: Distributor ID: Ubuntu
[2012-01-27 10:51:01,142][bs_02] CRITICAL:init:[06]: Description: Ubuntu 11.10
[2012-01-27 10:51:01,143][bs_02] CRITICAL:init:[07]: Release: 11.10
[2012-01-27 10:51:01,144][bs_02] CRITICAL:init:[08]: Codename: oneiric
[2012-01-27 10:51:01,144][bs_02] CRITICAL:init:[09]: Operating System Release : 3.0.0-15-generic
[2012-01-27 10:51:01,144][bs_02] CRITICAL:init:[10]: Operating System Version : #26-Ubuntu SMP Fri Jan 20 15:59:53 UTC 2012
[2012-01-27 10:51:01,144][bs_02] CRITICAL:init:[11]: Operating System Architecture : 32bit
[2012-01-27 10:51:01,144][bs_02] CRITICAL:init:[12]: Operating System Locale : fr_CH.UTF-8
[2012-01-27 10:51:01,145][bs_02] CRITICAL:init:[13]: Python Version : 2.7.2+
[2012-01-27 10:51:01,145][bs_02] CRITICAL:init:[14]: OpenERP-Server Version : 6.1rc1
[2012-01-27 10:51:01,145][bs_02] CRITICAL:init:[15]: Couldn't load module crm_caldav
No LSB modules are available.
[2012-01-27 10:51:01,485][bs_02] CRITICAL:init:[01]:
[2012-01-27 10:51:01,486][bs_02] CRITICAL:init:[02]: Environment Information :
[2012-01-27 10:51:01,486][bs_02] CRITICAL:init:[03]: System : Linux-3.0.0-15-generic-i686-with-Ubuntu-11.10-oneiric
[2012-01-27 10:51:01,487][bs_02] CRITICAL:init:[04]: OS Name : posix
[2012-01-27 10:51:01,487][bs_02] CRITICAL:init:[05]: Distributor ID: Ubuntu
[2012-01-27 10:51:01,487][bs_02] CRITICAL:init:[06]: Description: Ubuntu 11.10
[2012-01-27 10:51:01,487][bs_02] CRITICAL:init:[07]: Release: 11.10
[2012-01-27 10:51:01,488][bs_02] CRITICAL:init:[08]: Codename: oneiric
[2012-01-27 10:51:01,488][bs_02] CRITICAL:init:[09]: Operating System Release : 3.0.0-15-generic
[2012-01-27 10:51:01,488][bs_02] CRITICAL:init:[10]: Operating System Version : #26-Ubuntu SMP Fri Jan 20 15:59:53 UTC 2012
[2012-01-27 10:51:01,488][bs_02] CRITICAL:init:[11]: Operating System Architecture : 32bit
[2012-01-27 10:51:01,489][bs_02] CRITICAL:init:[12]: Operating System Locale : fr_CH.UTF-8
[2012-01-27 10:51:01,489][bs_02] CRITICAL:init:[13]: Python Version : 2.7.2+
[2012-01-27 10:51:01,492][bs_02] CRITICAL:init:[14]: OpenERP-Server Version : 6.1rc1
[2012-01-27 10:51:01,492][bs_02] CRITICAL:init:[15]: cannot import name calendar
[2012-01-27 10:51:01,493][bs_02] ERROR:root:Failed to initialize database `bs_02`.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/EGG-INFO/scripts/openerp-server", line 95, in preload_registry
    db, registry = openerp.pooler.get_db_and_pool(dbname, update_module=config['init'] or config['update'], pooljobs=False)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/pooler.py", line 33, in get_db_and_pool
    registry = RegistryManager.get(db_name, force_demo, status, update_module, pooljobs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/registry.py", line 138, in get
    update_module, pooljobs)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/registry.py", line 160, in new
    openerp.modules.load_modules(registry.db, force_demo, status, update_module)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/loading.py", line 335, in load_modules
    processed = load_marked_modules(cr, graph, states_to_load, force, status, report, loaded_modules)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/loading.py", line 254, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/loading.py", line 167, in load_module_graph
    register_module_classes(package.name)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/module.py", line 405, in register_module_classes
    __import__('openerp.addons.' + m)
  File "/usr/local/lib/python2.7/dist-packages/openerp-6.1rc1-py2.7.egg/openerp/modules/module.py", line 138, in load_module
    mod = imp.load_module(module_name, f, path, descr)
  File "/home/openerp/addons/crm_caldav/__init__.py", line 23, in <module>
    import crm_caldav
  File "/home/openerp/addons/crm_caldav/crm_caldav.py", line 24, in <module>
    from caldav import calendar
ImportError: cannot import name calendar

thank you for looking into it.

regards,
Bogdan

Tags: caldav

Related branches

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

Cannot tell if it is the same problem, as bug #914276 has no traceback... moreover, one CANNOT install/update crm_caldav anymore!! as in the bug mentioned, it was possible to install, but not to use it adequately.

however, by simply changing
/crm_caldav/crm_caldav.py:24 into

- from caldav import calendar
+from openerp.addons.caldav import calendar

everything goes as expected (install at least).

thank you!

(not sure for the other bug's issue...)

Revision history for this message
Roberto López López (bergensk) wrote : Re: [Bug 922526] Re: [6.1 trunk] [crm_caldav,caldav] import error

You are right, those are different issues. Anyhow, we are currently
working on fixing the caldav modules.

On 01/27/2012 02:15 PM, Bogdan Stanciu wrote:
> *** This bug is a duplicate of bug 914276 ***
> https://bugs.launchpad.net/bugs/914276
>
> Cannot tell if it is the same problem, as bug #914276 has no
> traceback... moreover, one CANNOT install/update crm_caldav anymore!! as
> in the bug mentioned, it was possible to install, but not to use it
> adequately.
>
> however, by simply changing
> /crm_caldav/crm_caldav.py:24 into
>
> - from caldav import calendar
> +from openerp.addons.caldav import calendar
>
> everything goes as expected (install at least).
>
> thank you!
>
> (not sure for the other bug's issue...)
>

Revision history for this message
Roberto López López (bergensk) wrote :

Related to #914276

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

moreover, project_caldav suffers from a simmilar issue!! (QA sometimes helps...)

so

/project_caldav/project_caldav.py:23 into

- from caldav import calendar
+from openerp.addons.caldav import calendar

thank you!
b

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

BTW, this is NOT a duplicate of bug #914276.

Revision history for this message
Vishal Parmar(Open ERP) (vpa-openerp) wrote :

Hello Bogdan Stanciu,

I have checked your issue with latest updated code of trunk(6.1) and also checked with rc1 but I didn't face any
problem as you have specified in your issue. would you please provide me your end revision no and please try
again without changing "from caldav import calendar".

Thanks and waiting for your reply.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Roberto López López (bergensk) wrote :

Dear Bogdan, I just marked it as duplicate by mistake, I already unchecked it after your 1st. message.

We are currently adapting all caldav related modules to trunk.

Regards

Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) wrote :

merged in trunk
revno: 6454 [merge]
revision-id: <email address hidden>

Changed in openobject-addons:
status: Incomplete → Fix Released
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.