← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 656370] Re: Upload image and import orders fail

 

Hi

After adding the two lines that Nico74 suggested, I now get this error:

Environment Information : 
System : Linux-2.6.32-21-generic-i686-with-Ubuntu-10.04-lucid
OS Name : posix
Distributor ID:	Ubuntu
Description:	Ubuntu 10.04 LTS
Release:	10.04
Codename:	lucid
Operating System Release : 2.6.32-21-generic
Operating System Version : #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010
Operating System Architecture : 32bit
Operating System Locale : es_ES.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 5.0.14
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/home/opentia/openerp-server-5.0.14/bin/netsvc.py", line 256, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/home/opentia/openerp-server-5.0.14/bin/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/home/opentia/openerp-server-5.0.14/bin/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/home/opentia/openerp-server-5.0.14/bin/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/opentia/openerp-server-5.0.14/bin/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/opentia/openerp-server-5.0.14/bin/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/opentia/openerp-server-5.0.14/bin/addons/base_sale_multichannels/sale.py", line 216, in import_orders
    self.import_shop_orders(cr, uid, shop, defaults, ctx)
  File "/home/opentia/openerp-server-5.0.14/bin/addons/magentoerpconnect/sale.py", line 114, in import_shop_orders
    'ids_or_filter':ids_or_filter
  File "/home/opentia/openerp-server-5.0.14/bin/addons/magentoerpconnect/magerp_osv.py", line 255, in mage_import_base
    rec_result = self.ext_import(cr, uid, rec_data, external_referential_id, defaults, context)
  File "/home/opentia/openerp-server-5.0.14/bin/addons/base_external_referentials/external_osv.py", line 167, in ext_import
    vals = self.oevals_from_extdata(cr, uid, external_referential_id, each_row, for_key_field, mapping_lines, defaults, context)
  File "/home/opentia/openerp-server-5.0.14/bin/addons/magentoerpconnect/sale.py", line 368, in oevals_from_extdata
    res = self.get_order_addresses(cr, uid, res, external_referential_id, data_record, key_field, mapping_lines, defaults, context)
  File "/home/opentia/openerp-server-5.0.14/bin/addons/magentoerpconnect/sale.py", line 256, in get_order_addresses
    inv_res = partner_address_obj.find_or_create(cr, uid, data_record['billing_address'], external_referential_id, address_default, context)
  File "/home/opentia/openerp-server-5.0.14/bin/addons/magentoerpconnect/partner.py", line 77, in find_or_create
    logger = netsvc.Logger()
NameError: global name 'netsvc' is not defined


I'm using connector branch ~openlabs-akretion-consortium/magentoerpconnect/improved_discount_n_address

Any help?
Thanks!

-- 
Upload image and import orders fail
https://bugs.launchpad.net/bugs/656370
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in Magento Open ERP Connector: New

Bug description:
Dear all

My Name is Mutunga

I have installed OpenERP version 5 and Magento. I have also installed and configured my magentoerpconnect with my magento shop setting and followed the instructions.

I am able to synchronize referential settings and import product categories , attributes, attribute sets etc. I am also able to export catalog from the magento shop actions.

However when I try Update images i get the following error

Environment Information : 
System : Windows-XP-5.1.2600-SP2
OS Name : nt
Operating System Release : XP
Operating System Version : 5.1.2600
Operating System Architecture : 32bit
Operating System Locale : en_US.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.12
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 256, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/magentoerpconnect/sale.py", line 64, in export_images
    res = self.pool.get('product.images').update_remote_images(cr, uid, recent_changed_images, ctx)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/magentoerpconnect/product_images.py", line 96, in update_remote_images
    'mime':each.filename and mimetypes.guess_type(each.filename)[0] or 'image/jpeg',
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/magentoerpconnect/magerp_osv.py", line 53, in call
    res = self.ser.call(self.session, method, arguments)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/xmlrpclib.py", line 1253, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.6/xmlrpclib.py", line 1392, in _parse_response
    return u.close()
  File "/usr/lib/python2.6/xmlrpclib.py", line 838, in close
    raise Fault(**self._stack[0])
Fault: <Fault 104: 'Cannot create image.'>

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Also when I try to import products i get the following error


Environment Information : 
System : Windows-XP-5.1.2600-SP2
OS Name : nt
Operating System Release : XP
Operating System Version : 5.1.2600
Operating System Architecture : 32bit
Operating System Locale : en_US.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 5.0.12
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 256, in dispatch
    result = LocalService(service_name)(method, *params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/netsvc.py", line 76, in __call__
    return getattr(self, method)(*params)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/service/web_services.py", line 577, in execute
    res = service.execute(db, uid, object, method, *args)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 58, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 119, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/osv.py", line 111, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base_sale_multichannels/sale.py", line 216, in import_orders
    self.import_shop_orders(cr, uid, shop, defaults, ctx)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/magentoerpconnect/sale.py", line 113, in import_shop_orders
    'ids_or_filter':ids_or_filter
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/magentoerpconnect/magerp_osv.py", line 236, in mage_import_base
    rec_result = self.ext_import(cr, uid, rec_data, external_referential_id, defaults, context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/base_external_referentials/external_osv.py", line 167, in ext_import
    vals = self.oevals_from_extdata(cr, uid, external_referential_id, each_row, for_key_field, mapping_lines, defaults, context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/magentoerpconnect/sale.py", line 305, in oevals_from_extdata
    res = self.get_order_addresses(cr, uid, res, external_referential_id, data_record, key_field, mapping_lines, defaults, context)
  File "/usr/local/lib/python2.6/dist-packages/openerp-server/addons/magentoerpconnect/sale.py", line 245, in get_order_addresses
    vat = data_record['customer_taxvat'].translate(allchars, delchars).upper()
AttributeError: 'NoneType' object has no attribute 'translate'


Can anyone help.