Page 1 of 1

EG in debug mode freezes on startup at module import

Posted: Fri Oct 16, 2015 2:53 am
by RiseUp
I am attempting to write a plugin for EventGhost. It will need access to another python library that I have retrieved from github, so I placed that file in the site-packages folder. After restarting EG, when I try to add my plugin, EG freezes. So, in an attempt to troubleshoot it, I ran EG in -debug mode and it freezes right away, never completing its startup. Here is what the log says:

Code: Select all

22:41:07: 0 EventThread: EventThread.__MainLoop()
Traceback (most recent call last) (1706):
  File "EventGhost.pyw", line 52, in <module>
    eg.Main()
  File "c:\Program Files (x86)\EventGhost\eg\__init__.py", line 79, in Main
    eg.Init.ImportAll()
  File "c:\Program Files (x86)\EventGhost\eg\Init.py", line 167, in ImportAll
    Traverse(eg.corePluginDir, "eg.CorePluginModule")
  File "c:\Program Files (x86)\EventGhost\eg\Init.py", line 149, in Traverse
    __import__(moduleName)
  File "c:\Program Files (x86)\EventGhost\plugins\netatmo\__init__.py", line 24, in <module>
    import lnetatmo
  File "c:\Program Files (x86)\EventGhost\lib26\site-packages\lnetatmo.py", line 114
    self.stations = { d['_id'] : d for d in self.rawData['devices'] }
                                     ^
SyntaxError: invalid syntax
This library works fine in python outside of EventGhost, and Eclipse gives me no syntax error in the code (especially at the point specified in the log).

What's going on here? :?:

Re: EG in debug mode freezes on startup at module import

Posted: Fri Oct 16, 2015 6:42 am
by Pako
It appears that the file lnetatmo.py is incompatible with python 2.6.

Pako

Re: EG in debug mode freezes on startup at module import

Posted: Sat Oct 17, 2015 12:22 am
by RiseUp
Pako wrote:It appears that the file lnetatmo.py is incompatible with python 2.6.

Pako
Thank you for pointing me in the right direction, Pako! I am working on making lnetatmo.py compatible with python 2.6 right now.