Database can not created after import/put a zip file(module) into our addons directory

Bug #904236 reported by SnippetBucket.com
40
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
OpenERP's Framework R&D

Bug Description

When I am going to create new db with latest server code.

[2011-12-14 12:52:09,991][?] INFO:server:OpenERP server is running, waiting for connections...
[2011-12-14 12:52:09,991][?] INFO:wsgi:HTTP service (werkzeug) running on 0.0.0.0:8069
[2011-12-14 12:52:31,979][template1] INFO:db.create:CREATE DATABASE picking11
[2011-12-14 12:52:35,446][picking11] ERROR:db.create:CREATE DATABASE failed:
Traceback (most recent call last):
  File "/home/tiny/sources/openobject-server/openerp/service/web_services.py", line 60, in _initialize_db
    openerp.modules.db.initialize(cr) # TODO this should be removed as it is done by pooler.restart_pool.
  File "/home/tiny/sources/openobject-server/openerp/modules/db.py", line 61, in initialize
    info = openerp.modules.load_information_from_description_file(i)
  File "/home/tiny/sources/openobject-server/openerp/modules/module.py", line 262, in load_information_from_description_file
    with tools.file_open(terp_file) as terp_f:
AttributeError: 'cStringIO.StringO' object has no attribute '__exit__'

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

This problem is version specific and only reproducible in ubuntu 10.10 as well as ubuntu 11.10.

Thanks for reporting!

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

Please ignore the comment#1, currently it is only reproducible in unbuntu 10.10 with web addons path.

I have attached a video for more reference so would you please check it.

Thank you!

Revision history for this message
Amit Parik (amit-parik) wrote :
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This does not seems to be reproducible I would mark this as invalid , please feel free to open the bug if you find the problem still exists with the latest trunk code with relavant useful information of the steps and environment you are using !

Thanks for understanding !

Regards,

Changed in openobject-server:
status: Confirmed → Invalid
importance: Medium → Undecided
assignee: OpenERP's Framework R&D (openerp-dev-framework) → nobody
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Naresh,

This bug is reproducible in all version so I am wrong on my comment#1 is that "It is version specific".\

But exact issue is not that, I have again reproduce this same issue with all version which steps are below.

1) Create one module and also create this module's zip file.
2) Put this file in to your addons directory or try to import module and see this zip module now appears in your addons directory.
3) Try to create a new database you will faced the above error.

So according to this precious steps I am reopening this bug.

Thank you!

summary: - Server crash during db creation
+ Database can not created after import/put a zip file(module) into our
+ addons directory
Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Low
status: Invalid → Confirmed
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

This problem is still persist, But I have applied the patch of lp:911603, which described the same problem (Will duplicate it).

Those patch is correct and it's working fine, So I requesting that on the fixing time please consider the lp:911603 's patch.

Thanks for understanding!

Changed in openobject-server:
importance: Low → Medium
Revision history for this message
Chris Forbes (chrisf-ijw) wrote :

Still broken in -rc1. Can you please merge the patch from lp:911603 sometime?

Revision history for this message
Chris Forbes (chrisf-ijw) wrote :

From a quick look at the runbot, it appears there is *no* test coverage on the code for zip module import. This would have shown up this bug -- shall I prepare another patch which adds a test for this area?

Revision history for this message
Chris Forbes (chrisf-ijw) wrote :

Fixed in openobject-server trunk rev #4003.

Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :

As mentioned by chris this is fixed in 4003 revid:<email address hidden> remove contextmanger

Changed in openobject-server:
status: Confirmed → Fix Released
Revision history for this message
Antony Lesuisse (OpenERP) (al-openerp) wrote :

@Chris Forbes: Yes of course a merge prop with a test case is always welcome.

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

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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