devendrapathi / sneldev-magento-openerp

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

Automatic synchornization not working #31

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
1.Follow the instruction to setup and copy the synchronization script
2.Select  'Start automatic synchronization' option from Magento on OpeERP

What is the expected output? What do you see instead?
I expect the automatic connection to work. Instead, the window closes without 
any message. On the log file I see this error "Unknown error in scheduler loop".
I can successfully import and export products and categories to and from 
Magento. Importing orders does not generate any error, but is not importing 
orders from Magento.

What version of the product are you using? On what operating system?
Windows 7
Magento 1.7
OpenERP 6.1

Please provide any additional information below.

The complete log message is:
2012-07-11 12:18:43 ===== Sync start
2012-07-11 12:18:43 Unknown error in scheduler loop

Original issue reported on code.google.com by garangan...@gmail.com on 11 Jul 2012 at 10:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
The error is in this line (sneldev_magento.py, line 156):

 pid = os.spawnl(os.P_NOWAIT, magento_params[0].auto_script_path)

<type 'exceptions.OSError'>--[Errno 22] Invalid argument

The magento_params[0].auto_script_path param is the path to the syncronization 
file. I have tried with several values (backslashes escaped,...) and none is 
working. I have also added a dummy parameter 
(http://stackoverflow.com/questions/1779081/there-is-no-spawnl-function-in-pytho
n-2-6) but it raised a new error:

<type 'exceptions.OSError'>--[Errno 8] Exec format error

Original comment by garangan...@gmail.com on 11 Jul 2012 at 11:29

GoogleCodeExporter commented 8 years ago

I have imported Popen on the header 

"from subprocess import Popen"

and updated the thread call from spawnl to Popen (python must be on the path of 
the PC):

"pid = Popen([sys.executable, 'python '+magento_params[0].auto_script_path])"

Now the automatic synchronization is working on Windows 7

Original comment by garangan...@gmail.com on 17 Jul 2012 at 8:32

GoogleCodeExporter commented 8 years ago
Thank you  garangan! We don't get any error now but it seems that automatic 
synchronization is not running ... (Windows 7). 

Original comment by efi...@gmail.com on 11 Oct 2012 at 10:45

GoogleCodeExporter commented 8 years ago
In Windows 7: What do I have to write in the Syncronization Script Path ? For 
example :

d:/sneldev_magento_sync.py

or 

d:\sneldev_magento_sync.py

???

Original comment by efi...@gmail.com on 11 Oct 2012 at 11:19

GoogleCodeExporter commented 8 years ago
I have copied the script to the root folder (just testing OpenERP, not 
deplpoyed to a production site). Thus, my Syncronization Script Path is
C:\\sneldev_magento_sync.py

Original comment by garangan...@gmail.com on 15 Oct 2012 at 10:45

GoogleCodeExporter commented 8 years ago
I'm sorry but I followed the last comment and It doesn't work :S I have the 
error message "Unknown error in scheduler loop". For information the manual 
import/export works.

I placed my file at the root of my C: drive and I changed the Synchronization 
script path to "C:\\sneldev_magento_sync.py"

My OpenERP 6.1 server is a Windows Server 2003SE SP2.
I use Magento Version 1.7.0.2

Thanks for your help

Original comment by geoffrey...@gmail.com on 22 Oct 2012 at 9:14