Products.PloneFormGen icon indicating copy to clipboard operation
Products.PloneFormGen copied to clipboard

ImportError: No module named upgrade

Open agitator opened this issue 8 years ago • 4 comments

Happens with buildout.coredev 5.1

2016-06-20 13:36:31 INFO ZServer HTTP server started at Mon Jun 20 13:36:31 2016
    Hostname: 0.0.0.0
    Port: 8080
2016-06-20 13:36:34 ERROR PloneFormGen PloneFormGen requires Plone >= 4.1.
2016-06-20 13:36:34 ERROR Application Could not import Products.PloneFormGen
Traceback (most recent call last):
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/OFS/Application.py", line 606, in import_product
    product=__import__(pname, global_dict, global_dict, silly)
  File "/Users/peter/workspace/plone/eggs/Products.PloneFormGen-1.8.1-py2.7.egg/Products/PloneFormGen/__init__.py", line 21, in <module>
    from plone.app.upgrade import v41
ImportError: No module named upgrade
Traceback (most recent call last):
  File "/Users/peter/workspace/plone/parts/instance/bin/interpreter", line 295, in <module>
    exec(compile(__file__f.read(), __file__, "exec"))
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
    run()
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 22, in run
    starter.prepare()
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 92, in prepare
    self.startZope()
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 268, in startZope
    Zope2.startup()
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/Zope2/__init__.py", line 47, in startup
    _startup()
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 67, in startup
    OFS.Application.import_products()
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/OFS/Application.py", line 583, in import_products
    import_product(product_dir, product_name, raise_exc=debug_mode)
  File "/Users/peter/workspace/plone/eggs/Zope2-2.13.24-py2.7.egg/OFS/Application.py", line 606, in import_product
    product=__import__(pname, global_dict, global_dict, silly)
  File "/Users/peter/workspace/plone/eggs/Products.PloneFormGen-1.8.1-py2.7.egg/Products/PloneFormGen/__init__.py", line 21, in <module>
    from plone.app.upgrade import v41
ImportError: No module named upgrade

agitator avatar Jun 20 '16 11:06 agitator

Do you depend on Products.CMFPlone or Plone? plone.app.upgrade is a Plone dependency only.

thet avatar Jun 21 '16 09:06 thet

fixed in https://github.com/collective/Products.PloneFormGen/

agitator avatar Jul 18 '16 09:07 agitator

Fixed where? You only link to an outdated fork of PloneFormGen. I guess we need to add plone.app.upgrade to the install_requires in setup.py, or make the code not fail on an ImportError.

mauritsvanrees avatar Jul 18 '16 11:07 mauritsvanrees

oops, fixed in https://github.com/collective/Products.PloneFormGen/commit/94ad48df563932e9e32a024e96895e841deaf84a https://github.com/collective/Products.PloneFormGen/commit/f177e8500c6fbb30302da6992c19d5d11759be5d https://github.com/collective/Products.PloneFormGen/commit/d6bc2b9a4df30e2299ca3786ef14d219abd4d4f4 https://github.com/collective/Products.PloneFormGen/commit/ed07a3271605794a7e0491708cd2f4e3a90b1d52 https://github.com/collective/Products.PloneFormGen/commit/a054fb4c8c3c47038de476b3a00ae2099b0fa1c3

basically i simplified the existing version check, since the master is targeted on Plone 5 anyhow...?

honestly it's kind of confusing where the actual development/improvement happens, with a fork in the collective and 4 prs and 44 open issues in the original repository

agitator avatar Aug 02 '16 12:08 agitator