← Back to team overview

openerp-india team mailing list archive

Re: [Bug 1055572] Re: no error when loading a custom module with a syntax error

 

Hi,

More information:

server bzr revno: 4186
addons bzr revno: 6823

I'm using a VM provided to me during an OpenERP training currently in
progress.

Regards,
Marcos

On Wed, Sep 26, 2012 at 3:14 PM, Marcos Mendez <marcos@xxxxxxxxxxxx>
wrote:

> Sorry for the delay. When trying to load the module for the first time
> (before installing), using the update module list functionality, there is
> no way to know what happened to a new module if it has some sort of error.
> After you load it, if there's an error (e.g. after an update) then of
> course openerp doesn't start.
>
> Regards,
> Marcos
>
> On Wed, Sep 26, 2012 at 2:45 AM, Jignesh Rathod(OpenERP) <
> 1055572@xxxxxxxxxxxxxxxxxx> wrote:
>
>> Hello Marcos Mendez ,
>>
>> I  have faced a trackback of invalid syntax.
>> So would you please check this again and elaborate
>> more regarding this issue.
>>
>> Traceback (most recent call last):
>>   File
>> "/home/jacky/workspace/Project/MY/trunk6/server/openerp/service/__init__.py",
>> line 55, in load_server_wide_modules
>>     openerp.modules.module.load_openerp_module(m)
>>   File
>> "/home/jacky/workspace/Project/MY/trunk6/server/openerp/modules/module.py",
>> line 425, in load_openerp_module
>>     getattr(sys.modules['openerp.addons.' + module_name],
>> info['post_load'])()
>>   File
>> "/home/jacky/workspace/Project/MY/trunk6/new_openerp-web/addons/web/__init__.py",
>> line 29, in wsgi_postload
>>     app = common.http.Root(o)
>>   File
>> "/home/jacky/workspace/Project/MY/trunk6/new_openerp-web/addons/web/common/http.py",
>> line 482, in __init__
>>     static_dirs = self._load_addons()
>>   File
>> "/home/jacky/workspace/Project/MY/trunk6/new_openerp-web/addons/web/common/http.py",
>> line 540, in _load_addons
>>     manifest = ast.literal_eval(open(manifest_path).read())
>>   File "/usr/lib/python2.7/ast.py", line 49, in literal_eval
>>     node_or_string = parse(node_or_string, mode='eval')
>>   File "/usr/lib/python2.7/ast.py", line 37, in parse
>>     return compile(source, filename, mode, PyCF_ONLY_AST)
>>   File "<unknown>", line 63
>>     'data', [
>>           ^
>> SyntaxError: invalid syntax
>>
>> Thanks and waiting for reply!
>>
>>
>> ** Changed in: openobject-server
>>        Status: New => Incomplete
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1055572
>>
>> Title:
>>   no error when loading a custom module with a syntax error
>>
>> Status in OpenERP Server:
>>   Incomplete
>>
>> Bug description:
>>
>>   When creating a new custom module, if there is a syntax error there is
>> no way to determine why the module was not loaded. For example:
>>
>>
>>   {
>>   "name": "OpenAcademy",
>>   "version": "1.0",
>>   "depends": ["base"],
>>   "author": "Author Name",
>>   "category": "Category",
>>   "description": """Description text""",
>>   "data", [],
>>   "demo": [],
>>   "test": [],
>>   "installable": True,
>>   "auto_install": False,
>>   }
>>
>>   When you go to update the module list and it will not be listed. Also
>>   when running the server with debug on, you will not see any errors.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/openobject-server/+bug/1055572/+subscriptions
>>
>
>

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/1055572

Title:
  no error when loading a custom module with a syntax error

Status in OpenERP Server:
  Incomplete

Bug description:
  
  When creating a new custom module, if there is a syntax error there is no way to determine why the module was not loaded. For example:

  
  {
  "name": "OpenAcademy",
  "version": "1.0",
  "depends": ["base"],
  "author": "Author Name",
  "category": "Category",
  "description": """Description text""",
  "data", [],
  "demo": [],
  "test": [],
  "installable": True,
  "auto_install": False,
  }

  When you go to update the module list and it will not be listed. Also
  when running the server with debug on, you will not see any errors.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/1055572/+subscriptions


References