Hi,

If I run my "dreports.py" module which imports the Dabo report writer it works fine.

But if I import "dreports.py" from my main application file using "importlib" I get the following exception.

ImportWarning: Not importing directory 'c:\dev\dabo\dabo\locale': missing __init__.py
File "c:\dev\twcbv4\twcbsrc\controllers\app_cb.py", line 1186, in <module>
  app.MainLoop()
File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_core.py", line 8660, in MainLoop
  wx.PyApp.MainLoop(self)
File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_core.py", line 7952, in MainLoop
  return _core_.PyApp_MainLoop(*args, **kwargs)
File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\lib\agw\aui\auibar.py", line 3704, in OnLeftUp
  self.ProcessEvent(e)
File "c:\Python27\Lib\site-packages\wx-2.9.5-msw\wx\_core.py", line 4154, in ProcessEvent
  return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
File "c:\dev\twcbv4\twcbsrc\controllers\app_cb.py", line 386, in onTBPrint
  dlgMod = importlib.import_module(modName)
File "c:\Python27\Lib\importlib\__init__.py", line 37, in import_module
  __import__(name)
File "c:\dev\twcbv4\twcbsrc\controllers\dreports.py", line 36, in <module>
  from dabo.lib.reportWriter import ReportWriter
File "c:\dev\dabo\dabo\__init__.py", line 9, in <module>
  import locale

Anyone has any idea why Python wants to import the "locale" folder instead of importing the "locale" module.

Following a portion of my sys.path entries:

c:\Python27\lib\site-packages\xlrd-0.8.0-py2.7.egg
c:\Python27\lib\site-packages\reportlab-2.6-py2.7-win32.egg
c:\Python27\lib\site-packages\pylint-0.26.0-py2.7.egg
c:\Python27\lib\site-packages\alembic-0.4.2-py2.7.egg
c:\Python27\lib\site-packages\mako-0.7.3-py2.7.egg
c:\Python27\lib\site-packages\markupsafe-0.15-py2.7.egg
h:\devprojectst\miked\medialockermain
c:\Python27\lib\site-packages\sqlalchemy-0.8.1-py2.7.egg
c:\Python27\lib\site-packages\pytest-2.3.5-py2.7.egg
c:\Python27\lib\site-packages\py-1.4.14-py2.7.egg
c:\Python27\lib\site-packages\geraldo-0.4.17-py2.7.egg
C:\Windows\system32\python27.zip
c:\Python27\DLLs
c:\Python27\lib
c:\Python27\lib\plat-win
c:\Python27\lib\lib-tk
c:\Python27
c:\Python27\lib\site-packages
c:\Python27\lib\site-packages\PIL
c:\dev\dabo
C:\dev\dabo\ide
c:\Python27\lib\site-packages\win32

I am on Windows with Python 2.7.2.

Appreciate any tips
Werner
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to