Submitted by : ajung at: 2007-10-21T22:47:16-07:00 (10 years ago)
Name :
Category : Severity : Status :
Optional subject :  
Optional comment :

The following error occurs if you have a ZWiki installation where ZWiki is coming out of a SVN repository. Then the code parts can not deal properly with '.svn' directory names. Either ignore such names or turn the exception into a log.warn(). It is common practice deploying software from SVN and keeping the .svn directory in order to update such an installation using SVN. The workaround right now is to remove the .svn directories manually.

Traceback (most recent call last):

File "/home/blohn/fml/parts/zope2/lib/python/Zope2/Startup/run.py", line 56, in ?
  run()
File "/home/blohn/fml/parts/zope2/lib/python/Zope2/Startup/run.py", line 21, in run
  starter.prepare()
File "/home/blohn/fml/parts/zope2/lib/python/Zope2/Startup/__init__.py", line 102, in prepare
  self.startZope()
File "/home/blohn/fml/parts/zope2/lib/python/Zope2/Startup/__init__.py", line 278, in startZope
  Zope2.startup()
File "/home/blohn/fml/parts/zope2/lib/python/Zope2/__init__.py", line 47, in startup
  _startup()
File "/home/blohn/fml/parts/zope2/lib/python/Zope2/App/startup.py", line 45, in startup
  OFS.Application.import_products()
File "/home/blohn/fml/parts/zope2/lib/python/OFS/Application.py", line 685, in import_products
  import_product(product_dir, product_name, raise_exc=debug_mode)
File "/home/blohn/fml/parts/zope2/lib/python/OFS/Application.py", line 708, in import_product
  product=__import__(pname, global_dict, global_dict, silly)
File "/home/blohn/fml/products/LatexWiki/__init__.py", line 11, in ?
  from Products import ZWiki # to get __version__
File "/home/blohn/fml/products/ZWiki/__init__.py", line 19, in ?
  import Defaults, OutlineSupport, Permissions, ZWikiPage
File "/home/blohn/fml/products/ZWiki/ZWikiPage.py", line 83, in ?
  from Admin import PageAdminSupport
File "/home/blohn/fml/products/ZWiki/Admin.py", line 17, in ?
  from pagetypes import PAGE_TYPE_UPGRADES
File "/home/blohn/fml/products/ZWiki/pagetypes/__init__.py", line 137, in ?
  __import__('Products.ZWiki.pagetypes.%s' % m)
 ValueError: Empty module name
blohn@zut:~/fml$

Catching (ImportError, ValueError) now --betabug, Mon, 22 Oct 2007 00:41:43 -0700 reply

Thanks for the report!

This used to be a blank except, which I narrowed down to catching only ImportError?:

Tue Mar 20 21:49:32 EET 2007  betabug.darcs@betabug.ch
* catch only ImportError on plugin loading - not so sure about this one

Now I'll tell it to catch (ImportError, ValueError). Get the fix from a darcs repository near you (once it made it through our little patch review process :-)

patch sent in --betabug, Mon, 22 Oct 2007 00:48:07 -0700 reply

Status: open => closed

Sent in the following patch to PatchDiscussion2007:

hunk ./pagetypes/__init__.py 138
-        except ImportError:
+        except (ImportError, ValueError):