SiriServerPlugins icon indicating copy to clipboard operation
SiriServerPlugins copied to clipboard

the eternal plugin problem!

Open XdiomedesX opened this issue 12 years ago • 16 comments

Hi,

first of all. Thanks for this nice work.

I have a problem and now a gave up my attempts to solve this problem by researching google.

The problem I have is that I cannot get ANY of your plugins to work.

I put the Plugins as a init.py file in a subfolder under "plugins". I also edited the name of the subfolder in the plugins.conf file. But I still get the error messages "ImportError: No module named plugins.weather".

I also browsed this other forum where you are participating. This problem was a topic there as well. But since now I couldn't find any solution.

What is the problem?

Thanks in advance for your help.

XdiomedesX avatar Apr 11 '12 22:04 XdiomedesX

So just to clarify,

plugins.conf you add the name of the folder or file in plugins/ directory. Please don't make any spaces or additional lines in that file and I suggest not editing it with a windows editor that makes crappy line endings. (there is no real parsing of the plugins.conf file, just a quick and dirty hack)

So example:

   plugins/weather/__init__.py

or

   plugins/weather.py

Will both work if you insert

   weather

in a single line in plugins.conf

I prefere the folder method as it has a clearer structure and gives more overview. Are you using SiriServerCore or SiriServer the old version?

Can you confirm (case sensitivity is also important) that it does not work with the latest SiriServerCore version to load a plugin called weather that is in the format above?

janrueth avatar Apr 12 '12 08:04 janrueth

Hi,

thanks for replying.

I confirm that neither cases do work for me. I use the latest SiriServerCore. I took your plugins.conf and replaced the word "examplePlugin" by "weather" using vi via ssh. So I didn't use any windows notepad.

I don't get it, it should work!?

XdiomedesX avatar Apr 12 '12 17:04 XdiomedesX

does the application has enough rights to read the file?

janrueth avatar Apr 13 '12 07:04 janrueth

Even if I set the whole Siri folder to 777 it does not work.

I guess it is something about the paths in the PluginManager.py? I need to go through the code (I am not familiar with python yet...).

XdiomedesX avatar Apr 13 '12 08:04 XdiomedesX

This is the error I get:

ERROR Plugin loading failed Traceback (most recent call last): File "/volume1/homes/admin/Siri/PluginManager.py", line 30, in load_plugins import(pluginPath+"."+line, globals(), locals(), [], -1) ImportError: No module named plugins.yahooWeather INFO Server is running and listening for connections

XdiomedesX avatar Apr 13 '12 08:04 XdiomedesX

could you please post what the following commands yield (run them from the siri server folder)

ls -lisah plugins/* cat plugins.conf

janrueth avatar Apr 13 '12 14:04 janrueth

This is what I get:

DiskStation> ls -lisah plugins/* plugins/help: 3803774 4 drwxr-xr-x 3 root root 4.0K Apr 12 20:58 . 3682523 4 drwxr-xr-x 4 admin users 4.0K Apr 12 20:40 .. 3803775 4 drwxr-xr-x 2 root root 4.0K Apr 12 20:32 @eaDir 3803777 4 -rwxr-xr-x 1 root root 1.8K Apr 12 20:32 init.py

plugins/yahooWeather: 3803778 4 drwxr-xr-x 2 root root 4.0K Apr 12 20:32 . 3682523 4 drwxr-xr-x 4 admin users 4.0K Apr 12 20:40 .. 3803779 192 -rwxr-xr-x 1 root root 190.5K Apr 12 20:32 init.py DiskStation> cat plugins.conf

here you can configure which plugins are loaded

The order in which they appear defines the order in which they are queried for responses to speech

The plugin must be in the plugins folder

help yahooWeather

XdiomedesX avatar Apr 13 '12 16:04 XdiomedesX

sorry for the weird formatting. here again...

here you can configure which plugins are loaded

The order in which they appear defines the order in which they are queried for responses to speech

The plugin must be in the plugins folder

help yahooWeather

XdiomedesX avatar Apr 13 '12 16:04 XdiomedesX

Do you have the problem if you start siri server with sudo?

If the problem disappears, it is because the files are owned by root:root and everything else seems to be owned by admin:users.

If sudoing solves the problem do a:

chown -R admin:users .

if the siriserver folder this should solve the problem

janrueth avatar Apr 14 '12 16:04 janrueth

the problem is my Synology does not know "sudo"

-ash: sudo: not found

XdiomedesX avatar Apr 14 '12 16:04 XdiomedesX

But I tried the "chown" command anyway. No effect. :(

XdiomedesX avatar Apr 14 '12 16:04 XdiomedesX

even if I login as admin.... no effect. :(

XdiomedesX avatar Apr 14 '12 16:04 XdiomedesX

thats all very odd, I can't see why it should not work, which version of python are you using?

I suppose as you said Synology, you are doing this on a NAS or something similar. You can also get root by just typing su, then you are asked for password and brought to a root console which you can exit with exit. You might try starting siri server there for a test.

I don't have a synology NAS here right now, my father got one but I can't access it from remote I think so I cannot test it myself if it is due to some limitations on the NAS...

janrueth avatar Apr 14 '12 17:04 janrueth

It is Python 2.6

XdiomedesX avatar Apr 16 '12 21:04 XdiomedesX

I am also having this issue on an Ubuntu 10.04 server. Sudo and chmod 777 didn't help.

LoghamLogan avatar Jun 17 '12 18:06 LoghamLogan

Solved: Accidentally deleted the default startRequestHandler and init.py folder/files sitting in the plugin/ root.

LoghamLogan avatar Jun 17 '12 18:06 LoghamLogan