System Plugin Error #169

Closed
kdschlosser opened this Issue Jan 10, 2017 · 6 comments

Projects

None yet

2 participants

@kdschlosser
Collaborator

OK so this is the skinny.
Youi have to do this on a computer that does not have Python installed on it. it's an intertwining issue

But if you grab any of the recent appveyor builds and install it you will be met with some ugly red.
but this error is very misleading. and it took me a while to track down the problem...

but this is how i managed to find the source of it.

if you open the system plugin init and move all of the import to below the register plugin. and leave the import eg above it

then run eventghost you will get the true source of the problem.

Error loading plugin file: C:\Program Files (x86)\EventGhost\plugins\System
Traceback (most recent call last) (WIP-2017.01.03-18.17.05):
  File "C:\Program Files (x86)\EventGhost\plugins\System\__init__.py", line 57, in <module>
    from qrcode import QRCode, constants as QRconstants
  File "C:\Program Files (x86)\EventGhost\lib27\site-packages\qrcode\__init__.py", line 1, in <module>
    from qrcode.main import QRCode
  File "C:\Program Files (x86)\EventGhost\lib27\site-packages\qrcode\main.py", line 1, in <module>
    from qrcode import constants, exceptions, util
  File "C:\Program Files (x86)\EventGhost\lib27\site-packages\qrcode\util.py", line 4, in <module>
    import six
ImportError: No module named six

I know there was someone in the forum complaining of this issue. and again a second person mentioned the issue but had said that they tried with appveyor builds as well. so i started snooping and installed an appveyor build. and low and behold there was the problem...

now I do not believe we are not experiencing these problems because we have six installed into python and not into EG but EG will still load it because EG now grabs the python site packages

which is why i think it is a horrible idea to have it set up to do this. and I do believe I have mentioned this kind of an issue happening because of it. Package Installer built into EG is the way to go.

I have not gone through the legwork of making a fix for it as of yet. but I am sure it is as simple as adding six to the dependencies.

@kdschlosser
Collaborator

the fix is simple a copy of six.py needs to be added to the lib27\sitepackages folder...

but I now have another error. and I am not sure if this is specific to my computer or not

Unhandled exception in WorkerThread <EventThread>:
Callers stack:
  File "wx\_core.pyc", line 8657, in MainLoop
  File "wx\_core.pyc", line 7952, in MainLoop
  File "wx\_core.pyc", line 16766, in <lambda>
Traceback (most recent call last) (0.5.0-beta5):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 253, in _DoOneEvent
    self.HandleAction(action)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 140, in HandleAction
    action()
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 324, in __call__
    self.returnValue = self.func(*self.args, **self.kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\EventThread.py", line 75, in StartSession
    actionThread.Func(actionThread.StartSession, 120)(filename)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 324, in __call__
    self.returnValue = self.func(*self.args, **self.kwargs)
  File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionThread.py", line 90, in StartSession
    set(eg.WinUsb.ListDevices().iterkeys()) -
  File "C:\Program Files (x86)\EventGhost\eg\Classes\WinUsb.py", line 464, in ListDevices
    raise WinError(err)
WindowsError: [Error 6] The handle is invalid.

maybe someone can test this and see if they get an error as well

@kdschlosser
Collaborator

Yup that fixed it...

need to add six.py to the lib27\site-packages folder.

@topic2k topic2k added the bug label Jan 11, 2017
@topic2k topic2k added this to the v0.5 milestone Jan 11, 2017
@topic2k
Contributor
topic2k commented Jan 11, 2017

I can confirm it. The qrcode module needs it. I'll make a PR.

@topic2k topic2k closed this in #171 Jan 12, 2017
@kdschlosser
Collaborator

hey pssssttt topic.. you have to go and say your sorry to that person in the forum that was the first to describe this problem... he got the "It works fine on my computer" phrase slung at him. LOL

@topic2k
Contributor
topic2k commented Jan 12, 2017

uups, you're right 😱
Thank you @per1234 for finding this bug and thank you @kdschlosser for opening an issue.

@kdschlosser
Collaborator

you know the guy i am talking about right?? someguy1

the one with the missing stuff form the action tree.. happens to be the stuff that would be in System

LOL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment