Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the eternal plugin problem! #6

Open
XdiomedesX opened this issue Apr 11, 2012 · 16 comments
Open

the eternal plugin problem! #6

XdiomedesX opened this issue Apr 11, 2012 · 16 comments

Comments

@XdiomedesX
Copy link

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.

@janrueth
Copy link
Owner

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?

@XdiomedesX
Copy link
Author

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!?

@janrueth
Copy link
Owner

does the application has enough rights to read the file?

@XdiomedesX
Copy link
Author

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
Copy link
Author

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

@janrueth
Copy link
Owner

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

ls -lisah plugins/*
cat plugins.conf

@XdiomedesX
Copy link
Author

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
Copy link
Author

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

@janrueth
Copy link
Owner

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

@XdiomedesX
Copy link
Author

the problem is my Synology does not know "sudo"

-ash: sudo: not found

@XdiomedesX
Copy link
Author

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

@XdiomedesX
Copy link
Author

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

@janrueth
Copy link
Owner

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

@XdiomedesX
Copy link
Author

It is Python 2.6

@LoghamLogan
Copy link

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

@LoghamLogan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants