[PyQt] ANN: dip v0.1 Released - An Application Development Framework for PyQt and Python v3

Darren Dale dsdale24 at gmail.com
Tue Jul 20 14:25:58 BST 2010


Are there some files missing from the plugins example? When I run
main.py from the plugins example, I get:

Traceback (most recent call last):
  File "main.py", line 3, in <module>
    from recipes.plugins import RecipeChooserPlugin
  File "/home/darren/Projects/dip/doc/examples/plugins/recipes/__init__.py",
line 4, in <module>
    from .i_recipe_chooser import IRecipeChooser
  File "/home/darren/Projects/dip/doc/examples/plugins/recipes/i_recipe_chooser.py",
line 3, in <module>
    from stock import IStockLevels
ImportError: No module named stock

I think there may be two issues: the stock module/package is not
included in the sources/hg repo, and an absolute import is being used
rather than a relative import:

$ grep -r StockLevels .
./recipes/plugins/recipe_chooser_plugin.py:from stock import IStockLevels
./recipes/plugins/recipe_chooser_plugin.py:        stock_levels =
self.service(IStockLevels)
./recipes/i_recipe_chooser.py:from stock import IStockLevels
./recipes/i_recipe_chooser.py:    stock_levels = Instance(IStockLevels)

Darren


More information about the PyQt mailing list