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

Python plugin issues #43

Closed
Nothing4You opened this issue Mar 11, 2014 · 6 comments
Closed

Python plugin issues #43

Nothing4You opened this issue Mar 11, 2014 · 6 comments

Comments

@Nothing4You
Copy link

Hi,

I'm currently on latest git (e41b644).

I click on "More services…", a window pops up loading the latest plugin infos from GitHub.
I choose these settings
2014-03-11-005914_313x372_scrot
and after confirming I get this
2014-03-11-005354_731x340_scrot

Both my python2 and python3 can import Crypto without any problems if I call them manually in a terminal.

[INFO] "Deleting /home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/dropbox" 
[WARN] "Failed to delete directory: /home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/dropbox" 
[INFO] "[1/4] Downloading archive for plugin from: https://raw.github.com/olav-st/screencloud-plugins/master/ftp/current.zip..." 
[INFO] "Checking https://raw.github.com/olav-st/screencloud-plugins/master/ftp/current.zip for redirect" 
[New Thread 0x7fffc0b3b700 (LWP 25292)]
[Thread 0x7fffc0b3b700 (LWP 25292) exited]
[New Thread 0x7fffc0b3b700 (LWP 25293)]
[INFO] "[2/4] File /tmp/current-current.zip downloaded." 
[INFO] "[3/4] Exctracting plugin archive /tmp/current-current.zip to /tmp/current-current" 
[INFO] "[4/4] Moving /tmp/current-current to plugin dir" 
[INFO] "Unloaded 3 plugin(s)" 
Traceback (most recent call last):
  File "<string>", line 5, in <module>
  File "/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules/paramiko/__init__.py", line 65, in <module>
    from transport import SecurityOptions, Transport
  File "/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules/paramiko/transport.py", line 33, in <module>
    from paramiko import util
  File "/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules/paramiko/util.py", line 33, in <module>
    from paramiko.common import *
  File "/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules/paramiko/common.py", line 98, in <module>
    from Crypto import Random
ImportError: No module named Crypto
[WARN] "Error while parsing script file /home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/main.py" 
[Thread 0x7fffdbe0e700 (LWP 25274) exited]
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name SFTPUploader
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'SFTPUploader' is not defined
@olav-st
Copy link
Owner

olav-st commented Mar 11, 2014

Hi,

You can try checking what paths the ScreenCloud python interpreter is using and compare them to your regular python installs. Go to Preferences and hit Ctrl+D to open the debug console. Type:

import sys
print sys.path

Also, keep in mind that the git version is not ready for release. It still has a few issues and I'm currently struggling to make it work properly on Windows and OS X.

@Nothing4You
Copy link
Author

py> import sys
py> print("\n".join(sys.path))
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/shell/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/ftp/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/shell/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/ftp/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/shell/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules
/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/ftp/modules
/opt/screencloud/modules/python-stdlib
/opt/screencloud/modules
/usr/lib/python27.zip
/usr/lib/python2.7/
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
>>> import sys
>>> print("\n".join(sys.path))

/usr/lib/python27.zip
/usr/lib/python2.7
/usr/lib/python2.7/plat-linux2
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/home/rschwab/.local/lib/python2.7/site-packages
/usr/lib/python2.7/site-packages
/usr/lib/python2.7/site-packages/gtk-2.0
/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode
/usr/lib/python2.7/site-packages/wx-3.0-gtk2
/usr/lib/site-python
diff --git a/x b/y
index 2e4b1da..186efb4 100644
--- a/x
+++ b/y
@@ -1,13 +1,17 @@
-
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/shell/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/ftp/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/shell/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/ftp/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/shell/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules
+/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/ftp/modules
+/opt/screencloud/modules/python-stdlib
+/opt/screencloud/modules
 /usr/lib/python27.zip
-/usr/lib/python2.7
+/usr/lib/python2.7/
 /usr/lib/python2.7/plat-linux2
 /usr/lib/python2.7/lib-tk
 /usr/lib/python2.7/lib-old
 /usr/lib/python2.7/lib-dynload
-/home/rschwab/.local/lib/python2.7/site-packages
-/usr/lib/python2.7/site-packages
-/usr/lib/python2.7/site-packages/gtk-2.0
-/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode
-/usr/lib/python2.7/site-packages/wx-3.0-gtk2
-/usr/lib/site-python

Crypto is actually located in /usr/lib/python2.7/site-packages/Crypto.

I'm aware of the fact that the git version is not stable, however, if I can report bugs that get fixed before the next release it's usually better than releasing and after the release getting all the bug reports.

@olav-st
Copy link
Owner

olav-st commented Mar 11, 2014

Try the newest git version (4e1b8b9). It should have site-packages included now.

Also, It's great that you want to help find bugs. Just don't excpect anything to work well ;)

@Nothing4You
Copy link
Author

Thanks, plugin loads without errors now.
I tried to upload something via SFTP and forgot to change the port (it was on 21, either wrong default or problem during upgrade), now I'm getting this:

Traceback (most recent call last):
  File "<string>", line 102, in upload
  File "/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules/paramiko/transport.py", line 1007, in connect
    self.start_client()
  File "/home/rschwab/.local/share/data/screencloud/ScreenCloud/plugins/sftp/modules/paramiko/transport.py", line 466, in start_client
    raise e
paramiko.SSHException: Error reading SSH protocol banner

Port 21 runs an FTP server, so there should probably be a nice error message explaining what's failing.
Otherwise, keyfile auth works without any problems, which is an awesome new feature.
Thanks!

@olav-st
Copy link
Owner

olav-st commented Mar 11, 2014

Thanks for the heads up. The default port was set to 21 for some reason. I've fixed it with olav-st/screencloud-plugins@2f74e98

@Nothing4You
Copy link
Author

I'll close this issue and create a new one for better error handling.

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

2 participants