Personal tools
You are here: Home   Bugs   import zope.app.location in kss.demo  
 
Document Actions

#20 — import zope.app.location in kss.demo

State Resolved
Release:
Area Other products
Issue type Bug
Severity Medium
Submitted by (anonymous)
Submitted on 2007-11-18
Responsible
Target release:
Return to tracker
Last modified on 2007-12-06 by Balazs Ree
If I try to install kss.demo in a virtualenvironment with zopeproject all works fine with one exception:

There is a import error:

ImportError: No module named location
Steps to reproduce:
My steps to get kssdemo running in a virtual environment:

1. Setup a new virtual environment
----------------------------------

$virtualenv kss-demo
$cd kss-demo
$./bin/easy-install zopeproject
$./bin/zopeproject
$./zopeproject kssdemo
$cd kssdemo

2. Edit setup.py and add components
-----------------------------------
adding the following lines to install_requires:

                        'zope.location',
                        'elementtree',
                        'kss.core',
                        'kss.demo',
3. Update the buildout
----------------------

$./bin/buildout -U

4. Include the new components
-----------------------------

$cd src/kssdemo

add the following lines to configure.zcml:

 <!-- Add your own component registrations here -->

  <include package="kss.core" file="meta.zcml" />
  <include package="kss.core" />
  <include package="kss.demo" file="meta.zcml" />
  <include package="kss.demo" />

5.Start the demo, but wait there is an error in kssdemo:
--------------------------------------------------------

$cd path/to/your/virtual/environment/kssdemo/
$./bin/kssdemo-ctl fg

  File "/home/peter/buildout_eggs/tmpjxkSkr/zopeconfiguration_340_py24egg/zope/configuration/xmlconfig.py", line 357, in endElementNS
  File "/home/peter/buildout_eggs/tmpjxkSkr/zopeconfiguration_340_py24egg/zope/configuration/config.py", line 542, in end
  File "/home/peter/buildout_eggs/tmpjxkSkr/zopeconfiguration_340_py24egg/zope/configuration/config.py", line 689, in finish
  File "/home/peter/buildout_eggs/tmpjxkSkr/zopeconfiguration_340_py24egg/zope/configuration/config.py", line 1381, in toargs
  File "/home/peter/buildout_eggs/tmpjxkSkr/zopeconfiguration_340_py24egg/zope/configuration/fields.py", line 139, in fromUnicode
  File "/home/peter/buildout_eggs/tmpjxkSkr/zopeconfiguration_340_py24egg/zope/configuration/config.py", line 182, in resolve
  File "/home/peter/buildout_eggs/kssdemo_122_py24egg/kss/demo/configfeature/fiveconfig.py", line 53, in ?
    import zope.app.location
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/peter/programme/p008_kss_demo/kssdemo/site.zcml", line 4.2-4.31
    ZopeXMLConfigurationError: File "/home/peter/programme/p008_kss_demo/kssdemo/src/kssdemo/configure.zcml", line 28.4-28.51
    ZopeXMLConfigurationError: File "/home/peter/buildout_eggs/kssdemo_122_py24egg/kss/demo/meta.zcml", line 4.3-4.55
    ZopeXMLConfigurationError: File "/home/peter/buildout_eggs/kssdemo_122_py24egg/kss/demo/configfeature/meta.zcml", line 8.4-8.38
    ZopeXMLConfigurationError: File "/home/peter/buildout_eggs/kssdemo_122_py24egg/kss/demo/configfeature/fiveconfig.zcml", line 8.4-12.6
    ImportError: No module named location

6. Edit kss.demo-1.2.2-py2.4.egg/kss/demo/configfeature/fiveconfig.py
---------------------------------------------------------------------

change import zope.app.location to import zope.location

7. Second start
---------------
$cd path/to/your/virtual/environment/kssdemo/
$./bin/kssdemo-ctl fg

8. Add a kss-demo
-----------------

Now we are on the road again...

http://localhost:8080/manage

Add a kss-demo-folder
Added by Balazs Ree on 2007-11-18 11:59
I am not using zopeproject so can you make it more exact please,

which Zope is this? Zope2 or Zope3? and which version of Zope?

The importance of this info is that we may need to provide both import versions to support older versions.

Also please tell us who you are, the tracker currently does not give this info.

Thanks,
Added by (anonymous) on 2007-11-18 12:24
I have installed
http://pypi.python.org/pypi/virtualenv/0.9.2

It is a tool create isolated Python environments.

zopeproject gives you a sandbox for egg-based projects in my case Zope 3.

http://pypi.python.org/pypi/zopeproject/0.4.1

Regards,
Peter Koppatz
Added by Balazs Ree on 2007-11-18 12:27

Peter,

> zopeproject gives you a sandbox for egg-based projects in my case Zope 3.

Which version of Zope 3 is this? Can you please tell the version number?

Thanks
Added by (anonymous) on 2007-11-18 12:44
Most eggs have the version 3.4.0

example:

/home/peter/buildout-eggs/zope.app.component-3.4.0-py2.4.egg',

Peter
Added by Balazs Ree on 2007-12-06 14:38
Issue state: unconfirmedopen
I fixed this, I hope it solves your problem.
Added by Balazs Ree on 2007-12-06 14:38
Issue state: openresolved