Forums

gnupg import error

Hey I am trying to use gnupg to encrypt some files before uploading to 3rd party sftp. I keep running into an error while trying to import gnupg. I installed it with pip. Any help would be greatly appreciated. Thanks!

02:25 ~/TXU/Enroll_Status $ python run_upload.py 
Traceback (most recent call last):
  File "run_upload.py", line 1, in <module>
    import gnupg
  File "/home/tfndevelopment/.local/lib/python2.7/site-packages/gnupg/__init__.py", line 23, in <module>
    from . import gnupg
  File "/home/tfndevelopment/.local/lib/python2.7/site-packages/gnupg/gnupg.py", line 42, in <module>
    from ._meta    import GPGBase
  File "/home/tfndevelopment/.local/lib/python2.7/site-packages/gnupg/_meta.py", line 131, in <module>
    class GPGBase(object):
  File "/home/tfndevelopment/.local/lib/python2.7/site-packages/gnupg/_meta.py", line 72, in __new__
    if cls._find_agent():
  File "/home/tfndevelopment/.local/lib/python2.7/site-packages/gnupg/_meta.py", line 105, in _find_agent
    this_process = psutil.Process(os.getpid())
  File "/usr/local/lib/python2.7/dist-packages/psutil/__init__.py", line 232, in __init__
    raise NoSuchProcess(pid, None, 'no process found with pid %s' % pid)
psutil._error.NoSuchProcess: no process found with pid 22517

Have a look at the first 3 posts in https://www.pythonanywhere.com/forums/topic/854/

HTH

Jim

we do now have an experimental docker console where you may be able to see the pids of your processes running within the same console. Would you like us to turn that on for you?

This is occuring on the import itself. Just the 1 line of code import gnupg. Can this not be used on pythonanywhere?

It can, if you want to try out our experimental consoles.

Would I be able to use the Scheduler for it? I need to automate the decryption process or its not worth putting on here. Thanks!

Unfortunately the process ID stuff only works in consoles right now, not in scheduled tasks :-(

Alright thanks for the information! This can be closed.

Actually can I get access to the experimental consoles?

Sure! That's done -- any new consoles you start will use the new system.

Awesome. Thanks!