ome / omero-py

Python project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
22 stars 32 forks source link

omero.client ensure args is not None #149

Closed manics closed 4 years ago

manics commented 4 years ago

c = omero.client('wss://idr.openmicroscopy.org/omero-ws') should work instead of throwing an Exception

jburel commented 4 years ago

Without this PR: client = omero.client('ws://idr.openmicroscopy.org/omero-ws') or client = omero.client(host='ws://idr.openmicroscopy.org/omero-ws') will throw

ModuleNotFoundError: No module named 'omero_ext.path'

With this PR: client = omero.client(host='ws://idr.openmicroscopy.org/omero-ws') or client = omero.client('ws://idr.openmicroscopy.org/omero-ws') do not throw.

This used to work on early dev version so this should be included in the coming 5.6 release This prevents the usage of web socket (e.g. mybinder usage, demo scheduled 23/01)

joshmoore commented 4 years ago

ModuleNotFoundError: No module named 'omero_ext.path'

I'm unsure how this would be related. For me, this suggests that something is out of sync, since this has been fixed separately.

jburel commented 4 years ago

Sorry I was not on master when I first run the command The error without the PR is

>>> client = omero.client(host='ws://idr.openmicroscopy.org/omero-ws')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jmarie/Documents/git-repo/omero-py/target/omero/__init__.py", line 67, in client
    return omero.clients.BaseClient(*args, **kwargs)
  File "/Users/jmarie/Documents/git-repo/omero-py/target/omero/clients.py", line 134, in __init__
    args.append(self._get_endpoint_from_hosturl(hosturl))
AttributeError: 'NoneType' object has no attribute 'append'
jburel commented 4 years ago

Tested in notebook too AttributeError: 'NoneType' object has no attribute 'append' with dev9 Regression between dev4 and dev9