python-irodsclient icon indicating copy to clipboard operation
python-irodsclient copied to clipboard

Using python-irodsclient behind a proxy on Windows

Open serg3y opened this issue 7 years ago • 4 comments

I can't figure out if it is possible to use python-irodsclient behind a proxy on windows, if so how?

Best Regards,

serg3y avatar May 17 '18 09:05 serg3y

Serge, What version of python? If I understand proxies, you shouldn't have a problem except that I've been led to understand there are issues when using PRC under python3 on a windows platform. Have not tried it myself, however.

W.r.t. the "how" question, does your version of python have a 'pip' command and, if so, does pip install python-irodsclient work?

-Dan

d-w-moore avatar May 17 '18 15:05 d-w-moore

Hello Dan, I am using Python 3.6, via IPython console, with Spyder 3.2.6 IDE. To get "pip install python-irodsclient" to run though windows command line I added the following windows user environment variables, namely "http_proxy", "https_proxy", "ftp_proxy" with my proxy settings "http://USER:PASSWORD@SERVER:PORT" Do you have any links to where this issue might be described concerning Python3? Thank you for your work, it works well on a computer that is not behind a proxy. -Serge

PS this is the error for eg: session.collections.create(url)

Traceback (most recent call last):
File "<ipython-input-9-8f72ab67e885>", line 1, in <module>
session.collections.create(url)
File "C:\Anaconda3\lib\site-packages\irods\manager\collection_manager.py", line 33, in create
with self.sess.pool.get_connection() as conn:
File "C:\Anaconda3\lib\site-packages\irods\pool.py", line 25, in get_connection
conn = Connection(self, self.account)
File "C:\Anaconda3\lib\site-packages\irods\connection.py", line 41, in __init__
self._server_version = self._connect()
File "C:\Anaconda3\lib\site-packages\irods\connection.py", line 189, in _connect
"{}:{}".format(*address))
NetworkException: Could not connect to specified host and port:

serg3y avatar May 18 '18 01:05 serg3y

hi Serge ,

I do not believe it's been documented yet, and that may be because Windows isn't currently a supported platform. There are options, possibly, which might involve -- in order of increasing impact to your project -- (1) switching to a version 2.x of Python, at least to test if that is the problem; (2) staying with Python3 but switching to Linux Subsystem for Windows (assuming you're using Windows 10) ... or (3) doing the iRODS client calls under Java, using Jargon.

-Dan

d-w-moore avatar May 18 '18 14:05 d-w-moore