--
Jeffrey D Peterson
Webmaster
Crary Industries, Inc.

From: zope-boun...@zope.org [mailto:zope-boun...@zope.org] On Behalf Of Andrew 
Watkins
Sent: Wednesday, March 10, 2010 9:35 PM
To: zope@zope.org
Subject: [Zope] questions about migrating forwards


Hi list

We have a legacy web service that is running on Zope 2.6.2 with Python 2.3.3


For various reasons - security, maintenance etc we have decide to try migrating 
this forward to a current version of python and zope.

e.g. Python 2.6 + Zope 2.12.2


I have a new clean SUSE linux 11 installation with the correct python, 
setuptools and I am using virtualenv to create a sandbox


I have installed the zope 2.12.2 and configured it in much the same way as the 
older system - (zeo with two data files, + 1 zope instance.)


All is good and I can start up the instance and access the management pages.


My next step is to get the Products list that we were using running.  Here I 
have run into two problems

1. ExternalFile

This fails to load with the error 'ImportError: No module named Interface'  
(stack trace below)

I tested this with zope 2.11.4 and it works ok.



Either port ExternalFile over to using zope.interface or find a new product to 
do what ExternalFile was doing for you.


2. ZMySQLDA

This fails with the message 'ImportError: No module named _mysql'

again this works ok on zope 2.11.4


So I guess there is a key step that I am missing out or a path, or installation 
that is required.

The main difference is that 2.12 is installed using virtualenv and then 
easy_install



You need to install mysql-python into virtualenv, activate your environment and 
use easy-install to install mysql-python from there.


e.g. bin/easy_install -i http://download.zope.org/Zope2/index/2.12.2 Zope2


Are there known incompatabilities with these Products ?  or is my installation 
just not quite right.


Thanks Andrew



stack trace for loading ExternalFile

{code}

/web/science_1/bin # ./zopectl fg

/web/science_1/bin/runzope -X debug-mode=on

2010-03-11 14:28:22 INFO ZServer HTTP server started at Thu Mar 11 14:28:22 2010

Hostname: 0.0.0.0

Port: 8080

2010-03-11 14:28:22 INFO ZServer FTP server started at Thu Mar 11 14:28:22 2010

Hostname: 0.0.0.0

Port: 8021

2010-03-11 14:28:22 INFO Zope Set effective user to "zope"

/web/science_1/Products/ExternalFile/ExternalFile.py:21: DeprecationWarning: 
MessageDialog is deprecated. import from App.Dialogs instead

  from Globals import MessageDialog

2010-03-11 14:28:22 ERROR Application Could not import Products.ExternalFile

Traceback (most recent call last):

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/OFS/Application.py",
 line 596, in import_product

    product=__import__(pname, global_dict, global_dict, silly)

  File "/web/science_1/Products/ExternalFile/__init__.py", line 18, in <module>

    from ExternalFile import manage_addExternalFileForm, addExternalFile

  File "/web/science_1/Products/ExternalFile/ExternalFile.py", line 36, in 
<module>

    from IExternalFile import IExternalFile

  File "/web/science_1/Products/ExternalFile/IExternalFile.py", line 16, in 
<module>

    from Interface import Base

ImportError: No module named Interface

Traceback (most recent call last):

  File "/web/bin/runzope", line 8, in <module>

    load_entry_point('Zope2==2.12.2', 'console_scripts', 'runzope')()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/Startup/run.py",
 line 21, in run

    starter.prepare()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py",
 line 87, in prepare

    self.startZope()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py",
 line 264, in startZope

    Zope2.startup()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/__init__.py",
 line 47, in startup

    _startup()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/App/startup.py",
 line 58, in startup

    OFS.Application.import_products()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/OFS/Application.py",
 line 573, in import_products

    import_product(product_dir, product_name, raise_exc=debug_mode)

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/OFS/Application.py",
 line 596, in import_product

    product=__import__(pname, global_dict, global_dict, silly)

  File "/web/science_1/Products/ExternalFile/__init__.py", line 18, in <module>

    from ExternalFile import manage_addExternalFileForm, addExternalFile

  File "/web/science_1/Products/ExternalFile/ExternalFile.py", line 36, in 
<module>

    from IExternalFile import IExternalFile

  File "/web/science_1/Products/ExternalFile/IExternalFile.py", line 16, in 
<module>

    from Interface import Base

ImportError: No module named Interface

{code}


{code}

(web)horatio:/web/science_1 # bin/zopectl fg

/web/science_1/bin/runzope -X debug-mode=on

2010-03-11 15:14:58 INFO ZServer HTTP server started at Thu Mar 11 15:14:58 2010

Hostname: 0.0.0.0

Port: 8080

2010-03-11 15:14:58 INFO ZServer FTP server started at Thu Mar 11 15:14:58 2010

Hostname: 0.0.0.0

Port: 8021

2010-03-11 15:14:58 INFO Zope Set effective user to "zope"

/web/science_1/Products/Photo/Photo.py:36: DeprecationWarning: Persistent is 
deprecated. import from Persistence instead

  from Globals import Persistent

/web/science_1/Products/Photo/Photo.py:42: DeprecationWarning: InitializeClass 
is deprecated. import from App.class_init instead

  from Globals import InitializeClass, DTMLFile

/web/science_1/Products/Photo/Photo.py:42: DeprecationWarning: DTMLFile is 
deprecated. import from App.special_dtml instead

  from Globals import InitializeClass, DTMLFile

/web/science_1/Products/Redirector/Redirector.py:12: DeprecationWarning: 
HTMLFile is deprecated. import from App.special_dtml instead

  from Globals import Persistent, HTMLFile, HTML, MessageDialog

/web/science_1/Products/Redirector/Redirector.py:12: DeprecationWarning: HTML 
is deprecated. import from App.special_dtml instead

  from Globals import Persistent, HTMLFile, HTML, MessageDialog

/web/science_1/Products/Redirector/Redirector.py:12: DeprecationWarning: 
MessageDialog is deprecated. import from App.Dialogs instead

  from Globals import Persistent, HTMLFile, HTML, MessageDialog

2010-03-11 15:14:59 WARNING Init Ambiguous name for method of 
Products.Redirector.Redirector.RedirectorBase: 'manage' != 'manage_main'

2010-03-11 15:14:59 ERROR Application Could not import Products.ZMySQLDA

Traceback (most recent call last):

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/OFS/Application.py",
 line 596, in import_product

    product=__import__(pname, global_dict, global_dict, silly)

  File "/web/science_1/Products/ZMySQLDA/__init__.py", line 91, in <module>

    import DA

  File "/web/science_1/Products/ZMySQLDA/DA.py", line 92, in <module>

    from db import DB

  File "/web/science_1/Products/ZMySQLDA/db.py", line 89, in <module>

    import _mysql

ImportError: No module named _mysql

Traceback (most recent call last):

  File "/web/bin/runzope", line 8, in <module>

    load_entry_point('Zope2==2.12.2', 'console_scripts', 'runzope')()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/Startup/run.py",
 line 21, in run

    starter.prepare()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py",
 line 87, in prepare

    self.startZope()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/Startup/__init__.py",
 line 264, in startZope

    Zope2.startup()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/__init__.py",
 line 47, in startup

    _startup()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/Zope2/App/startup.py",
 line 58, in startup

    OFS.Application.import_products()

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/OFS/Application.py",
 line 573, in import_products

    import_product(product_dir, product_name, raise_exc=debug_mode)

  File 
"/web/lib/python2.6/site-packages/Zope2-2.12.2-py2.6-linux-x86_64.egg/OFS/Application.py",
 line 596, in import_product

    product=__import__(pname, global_dict, global_dict, silly)

  File "/web/science_1/Products/ZMySQLDA/__init__.py", line 91, in <module>

    import DA

  File "/web/science_1/Products/ZMySQLDA/DA.py", line 92, in <module>

    from db import DB

  File "/web/science_1/Products/ZMySQLDA/db.py", line 89, in <module>

    import _mysql

ImportError: No module named _mysql

{code}

Andrew Watkins
Systems Development Team Manager
National Institute Water & Atmospheric Research (NIWA).


NIWA is the trading name of the National Institute of Water & Atmospheric 
Research Ltd.
_______________________________________________
Zope maillist  -  Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to