It is currently Sat Feb 11, 2012 11:29 am

All times are UTC + 2 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Upgrade 4.0.2 -> 4.2.0 on Python 2.3
PostPosted: Tue Nov 06, 2007 1:07 am 
Offline

Joined: Wed Jun 20, 2007 12:22 pm
Posts: 52
Location: Lokeren, Belgium
Running the tinyerp-server --update=all part gives following stackdump :

Code:
Tue, 06 Nov 2007 00:02:02 INFO:init:addon:base:creating or updating database tables
Traceback (most recent call last):
  File "./tinyerp-server.py", line 172, in ?
    pooler.get_db_and_pool(tools.config['db_name'], update_module=True)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/pooler.py", line 53, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/addons/__init__.py", line 274, in load_modules
    load_module_graph(cr, graph, status, report=report)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/addons/__init__.py", line 204, in load_module_graph
    init_module_objects(cr, m, modules)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/addons/__init__.py", line 182, in init_module_objects
    obj._auto_init(cr)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/osv/orm.py", line 390, in _auto_init
    default = self._defaults[k](self, cr, 1, {})
  File "/usr/lib/python2.3/site-packages/tinyerp-server/addons/base/module/module.py", line 160, in <lambda>
    'filter': lambda *a: 'href="([a-zA-Z0-9_]+)-('+release.version.rsplit('.', 1)[0]+'.(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\\d*)*)(-r(\\d+))?)(\.zip)"',
AttributeError: 'str' object has no attribute 'rsplit'


str.rsplit() is Python 2.4 dependent, is TinyERP now dependant on this ?

Could anyone hand me a quick fix (not familiar with split / rsplit syntax) so I could just change the filter line to use split or something like that...

The code block concerned :
Code:
        _defaults = {
                'sequence': lambda *a: 5,
                'filter': lambda *a: 'href="([a-zA-Z0-9_]+)-('+release.version.rsplit('.', 1)[0]+'.(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\\d*)*)(-r(\\d+))?)(\.zip)"',
                'active': lambda *a: 1,
        }


Wouldn't
Code:
release.version[:-2]

be a much more version independent approach ? (Yes I know it would rely on patch versions being single character, but it would work fine just this once right ?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 06, 2007 1:19 am 
Offline

Joined: Wed Jun 20, 2007 12:22 pm
Posts: 52
Location: Lokeren, Belgium
Having replaced all the relevant rsplit() code blocks with (temporary) strings just containing "4.2" the update process continues fine until :

Code:
Tue, 06 Nov 2007 00:16:25 INFO:init:
<assert>
                        <test>
                </assert>
Traceback (most recent call last):
  File "./tinyerp-server.py", line 172, in ?
    pooler.get_db_and_pool(tools.config['db_name'], update_module=True)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/pooler.py", line 53, in get_db_and_pool
    addons.load_modules(db, force_demo, status, update_module)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/addons/__init__.py", line 274, in load_modules
    load_module_graph(cr, graph, status, report=report)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/addons/__init__.py", line 221, in load_module_graph
    tools.convert_xml_import(cr, m, tools.file_open(opj(m, filename)).read(), idref, mode=mode, **kwargs)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/tools/convert.py", line 665, in convert_xml_import
    obj.parse(xmlstr)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/tools/convert.py", line 596, in parse
    self._tags[rec.nodeName](self.cr, rec, n)
  File "/usr/lib/python2.3/site-packages/tinyerp-server/tools/convert.py", line 492, in _tag_assert
    if eval(f_expr, globals) != f_val: # assertion failed
  File "<string>", line 0, in ?
NameError: name 'line_id' is not defined


Which I have no idea where the error is coming from...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 2:39 pm 
Offline

Joined: Wed Jun 20, 2007 12:22 pm
Posts: 52
Location: Lokeren, Belgium
After a lot of problems I decided to just upgrade the whole system and go with a Python 2.5.1 installation and put TinyERP on that.

Now the tinyerp runs after some errors (none of them seemed very critical at the time) but when starting the client most things work except opening the "Products" screen, I can open the menu itself but double clicking on the Products link in the right side portion of the screen gives me following error :

Code:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/tinyerp-server/netsvc.py", line 206, in _dispatch
    r=m(*params)
  File "/usr/lib/python2.5/site-packages/tinyerp-server/service/web_services.py", line 366, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/osv.py", line 111, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/osv.py", line 92, in execute_cr
    res = getattr(object,method)(cr, uid, *args, **kw)
  File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/orm.py", line 1506, in fields_view_get
    xarch, xfields = self.__view_look_dom_arch(cr, user, doc, context=context)
  File "/usr/lib/python2.5/site-packages/tinyerp-server/osv/orm.py", line 1371, in __view_look_dom_arch
    fields[field].update(fields_def[field])
KeyError: u'qty_dispo'


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 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:

Protected by Anti-Spam ACP