Error loading LibCEC

Questions and comments specific to a particular plugin should go here.
Post Reply
prototyp206
Posts: 1
Joined: Thu Jun 15, 2017 1:19 pm

Error loading LibCEC

Post by prototyp206 » Thu Jun 15, 2017 1:25 pm

Hello, i have EventGhost 0.4.1.r1 on Windows 10 installed and also connected the Pulse Eight CEC Adapter.
I installed "libCEC 4.0.2 (Includes Windows Driver) 4/5/2017" from here:

https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter

But after i start eventghost it says:

Code: Select all

Error while loading plugin-file C:\Program Files (x86)\EventGhost\plugins\libCEC.
Traceback (most recent call last) (1722):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginModuleInfo.py", line 70, in __init__
    __import__(moduleName, None, None, [''])
  File "C:\Program Files (x86)\EventGhost\plugins\libCEC\__init__.py", line 45, in <module>
    import cec
  File "C:\Program Files (x86)\EventGhost\plugins\libCEC\cec\__init__.py", line 28, in <module>
    _cec = swig_import_helper()
  File "C:\Program Files (x86)\EventGhost\plugins\libCEC\cec\__init__.py", line 24, in swig_import_helper
    _mod = imp.load_module('_cec', fp, pathname, description)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
Error while loading plugin-file C:\Program Files (x86)\EventGhost\plugins\libCEC.
Traceback (most recent call last) (1722):
  File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginModuleInfo.py", line 70, in __init__
    __import__(moduleName, None, None, [''])
  File "C:\Program Files (x86)\EventGhost\plugins\libCEC\__init__.py", line 45, in <module>
    import cec
  File "C:\Program Files (x86)\EventGhost\plugins\libCEC\cec\__init__.py", line 28, in <module>
    _cec = swig_import_helper()
  File "C:\Program Files (x86)\EventGhost\plugins\libCEC\cec\__init__.py", line 24, in swig_import_helper
    _mod = imp.load_module('_cec', fp, pathname, description)
ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden.
---> Welcome to EventGhost <---
Any ideas?

User avatar
kgschlosser
Site Admin
Posts: 3105
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error loading LibCEC

Post by kgschlosser » Thu Jun 15, 2017 6:30 pm

see here

viewtopic.php?f=9&t=5907&hilit=libcec

as well as here if the issue is driver related on windows 10

viewtopic.php?f=10&t=9658


I would also upgrade your EventGhost version to 0.5 this is due to some issues with EG 0.4 and windows 10 that have been sorted out in 0.5
If you like the work I have been doing then feel free to Image

jachin99
Experienced User
Posts: 324
Joined: Sat Feb 13, 2016 8:39 pm

Re: Error loading LibCEC

Post by jachin99 » Thu Jun 15, 2017 11:34 pm

I have had problems with cec adapters before, and never really got it working the way I wanted to but let us all know if you get things sorted out. What kind of TV/Stereo do you have it hooked up to

MattTS
Posts: 3
Joined: Tue Jun 20, 2017 6:59 pm

Re: Error loading LibCEC

Post by MattTS » Tue Jun 20, 2017 7:02 pm

I have the exact same issue where it can't seem to load the _cec shared library. I've tried putting the cec.pyd and cec.dll files in various directories such as lib27, site-packages etc but without any success. I haven't tried adding it to PYTHONPATH but I'm not sure how that works under Windows.

User avatar
kgschlosser
Site Admin
Posts: 3105
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error loading LibCEC

Post by kgschlosser » Wed Jun 21, 2017 12:58 am

EG makes no use of PYTHONPATH

If you are running on Windows 10 I would try upgrading EG to 0.5 as well as follow the directions for disabling the driver signing. The process for disabling the driver signing from my understanding will not put windows into "test mode" and you will not have a watermark on the lower right of the screen. It can be undone and it's worth a shot. Windows 10 has caused a huge amount of issues with EG and the biggest one is how who and what can access/indrall/remove drivers. They have e pretty much locked the system up.

Also try running EG elevated. Being in the Administrators group is not enough. There are still permissions that you will not have. So runas is how you have to do it.

Another thing that is worth a shot.

If you have a Windows 7/8 PC if it is possible to test it out on that and see if you have the same problems.

Unfortunately the only way to do this is by trial and error. As the Traceback is a little illusive as to what the problem actually is. I will take a look at the plugin to see how it is going about loading the DLL.

Window has become seriously picky about the same thread that opens the DLL be the same as the one that accesses it. So If the DLL is loaded at the module level and is accessed at the class level from inside of the plugin. This could also cause issues.
If you like the work I have been doing then feel free to Image

MattTS
Posts: 3
Joined: Tue Jun 20, 2017 6:59 pm

Re: Error loading LibCEC

Post by MattTS » Wed Jun 21, 2017 6:36 am

I can get the hardware working with their binaries that use their dlls so I don't think it's a driver issue. I've been using EventGhost on Windows 10 without any issues for my uses so far. In fact I'd never used EventGhost before switching to Windows 10.

Unlike OP I'm using the 0.5 branch of EventGhost and have the same issues. Tried running as administrator too.

I tried looking at dependency walker for the dll and the .pyd (I'd never encountered one before) and noticed a missing dependency of python26.dll. Tried installing Python 2.6.6 and couldn't get any further even further. It occurred to me that it could be a 32bit/64bit issue so I tried a 32bit release of Python 2.6.6 and got a different error: "module use of python26.dll conflicts with this version of python". Seems odd to me that it'd use the 2.6 branch of Python rather than 2.7.

User avatar
kgschlosser
Site Admin
Posts: 3105
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error loading LibCEC

Post by kgschlosser » Thu Jun 22, 2017 7:55 am

ok what is going on is the _cec.pyd file is a pre compiled python file. it has been compiled using python 2.6 and because of that it is not able to be loaded in python 2.7 which is what EG 0.5 uses. I have sent a message over to the developers and It should be a simple thing for them to recompile it using python 2.7 instead
If you like the work I have been doing then feel free to Image

MattTS
Posts: 3
Joined: Tue Jun 20, 2017 6:59 pm

Re: Error loading LibCEC

Post by MattTS » Thu Jun 22, 2017 10:57 pm

Great, thank you!

User avatar
kgschlosser
Site Admin
Posts: 3105
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error loading LibCEC

Post by kgschlosser » Fri Jun 23, 2017 3:42 am

no worries m8. it is in their hands now. so it all depends on how long it takes them to sort it out.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3105
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Error loading LibCEC

Post by kgschlosser » Thu Jul 20, 2017 4:02 pm

heyyyyyyyyyyyy

I didn't forget ya...

I had to work this issue out with the developer of libCEC.
give the attached file a go. you will have to close eg. and delete the existing plugin from the eventghost plugins directory then run the installer that is in the exe. and start EG up again.
Attachments
libCEC-4.0.2.zip
(1.25 MiB) Downloaded 76 times
If you like the work I have been doing then feel free to Image

Post Reply