devendrapathi / sneldev-magento-openerp

Automatically exported from code.google.com/p/sneldev-magento-openerp
0 stars 1 forks source link

Export stock to Magento Fails with following error #15

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. openerp 6.0.3
2. openerp connector .8
3. magento 1.5.1.rc1

What is the expected output? What do you see instead?
If i knew i tell you but here is what I get instead...
Traceback (most recent call last):
  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/server/bin/service/web_services.py", line 636, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/bin/service/web_services.py", line 663, in exp_execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File "/opt/openerp/server/bin/service/web_services.py", line 645, in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/opt/openerp/server/bin/wizard/__init__.py", line 177, in execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/opt/openerp/server/bin/wizard/__init__.py", line 152, in execute_cr
    next_state = result_def['next_state'](self, cr, uid, data, context)
  File "/opt/openerp/server/bin/addons/sneldev_magento.zip/sneldev_magento/wizard/sneldev_magento_stock_export.py", line 38, in do_stock_export
    if (self.pool.get('sneldev.magento').export_stock(cr, uid) < 0):
  File "/opt/openerp/server/bin/addons/sneldev_magento.zip/sneldev_magento/sneldev_magento.py", line 309, in export_stock
    log.print_traceback()
  File "/opt/openerp/server/bin/addons/sneldev_magento.zip/sneldev_magento/common_tools.py", line 111, in print_traceback
    traceback.print_exc(file=self._logfile)
  File "/usr/lib/python2.6/traceback.py", line 227, in print_exc
    print_exception(etype, value, tb, limit, file)
  File "/usr/lib/python2.6/traceback.py", line 124, in print_exception
    _print(file, 'Traceback (most recent call last):')
  File "/usr/lib/python2.6/traceback.py", line 13, in _print
    file.write(str+terminator)
AttributeError: 'bool' object has no attribute 'write'

What version of the product are you using? On what operating system?
ubuntu 10.04 server, 

Please provide any additional information below.
The syncing does not work, nor does the loggin.

Original issue reported on code.google.com by mr.tezoz...@gmail.com on 5 Oct 2011 at 7:31

GoogleCodeExporter commented 8 years ago
Here is another error when trying to export the stock to magento....
Traceback (most recent call last):
  File "/opt/openerp/server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/server/bin/service/web_services.py", line 636, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/server/bin/service/web_services.py", line 663, in exp_execute
    return self._execute(db, uid, wiz_id, datas, action, context)
  File "/opt/openerp/server/bin/service/web_services.py", line 645, in _execute
    return wiz.execute(db, uid, self.wiz_datas[wiz_id], action, context)
  File "/opt/openerp/server/bin/wizard/__init__.py", line 177, in execute
    res = self.execute_cr(cr, uid, data, state, context)
  File "/opt/openerp/server/bin/wizard/__init__.py", line 152, in execute_cr
    next_state = result_def['next_state'](self, cr, uid, data, context)
  File "/opt/openerp/server/bin/addons/sneldev_magento.zip/sneldev_magento/wizard/sneldev_magento_stock_export.py", line 38, in do_stock_export
    if (self.pool.get('sneldev.magento').export_stock(cr, uid) < 0):
  File "/opt/openerp/server/bin/addons/sneldev_magento.zip/sneldev_magento/sneldev_magento.py", line 308, in export_stock
    log.append('ERROR : ' + prods[i]['code'])
TypeError: cannot concatenate 'str' and 'bool' objects

Original comment by mr.tezoz...@gmail.com on 5 Oct 2011 at 7:36

GoogleCodeExporter commented 8 years ago
Here is the latest log... of the failed export of stock...

Original comment by mr.tezoz...@gmail.com on 5 Oct 2011 at 8:20

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by sneldev@gmail.com on 23 Nov 2011 at 9:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Seeing the error outpout it seems that the file you are trying to write doesn't 
exist or you haven't got write permissions..

See the following lines:
-file.write(str+terminator)
-AttributeError: 'bool' object has no attribute 'write'

When the module try to obtain the var file, as it can't obtain the file, the 
module puts the bool value "false" to the variable file and it raises when you 
try to  access to the attribute write.

I hope this will help you to solve this issue in your enviorement.

Original comment by alex.nor...@gmail.com on 29 Mar 2012 at 1:06

GoogleCodeExporter commented 8 years ago
I have exactly the same problem. But whats a solution ? thanks for help

Original comment by best4da...@gmail.com on 26 Feb 2013 at 10:29