Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

EG in debug mode freezes on startup at module import

Questions and comments specific to a particular plugin should go here.
Post Reply
RiseUp
Posts: 17
Joined: Mon Nov 24, 2014 3:28 am

EG in debug mode freezes on startup at module import

Post 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? :?:
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

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

Post by Pako »

It appears that the file lnetatmo.py is incompatible with python 2.6.

Pako
RiseUp
Posts: 17
Joined: Mon Nov 24, 2014 3:28 am

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

Post 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.
Post Reply