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

BUG: handle IndexError: list index out of range for invalid URIs #1

Open
grimen opened this issue Jan 14, 2020 · 0 comments
Open

BUG: handle IndexError: list index out of range for invalid URIs #1

grimen opened this issue Jan 14, 2020 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@grimen
Copy link
Owner

grimen commented Jan 14, 2020

======================================================================
ERROR: test___str__ (__main__.TestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/grimen/.pyenv/versions/3.8.0/lib/python3.8/site-packages/connection_uri/uri.py", line 336, in deserialize
    'ports': [ports[endpoint_index]],
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "markable_utils/tests/data/storages2/test_mongodb.py", line 1009, in test___str__
    reset(storage)
  File "markable_utils/tests/data/storages2/test_mongodb.py", line 85, in reset
    raise error
  File "markable_utils/tests/data/storages2/test_mongodb.py", line 60, in reset
    client = connect(storage)
  File "markable_utils/tests/data/storages2/test_mongodb.py", line 47, in connect
    raise error
  File "markable_utils/tests/data/storages2/test_mongodb.py", line 36, in connect
    uri_object = connection_uri.unpack(storage.uri)
  File "/Users/grimen/.pyenv/versions/3.8.0/lib/python3.8/site-packages/connection_uri/uri.py", line 418, in unpack
    return uri.unpack(*args, **kwargs)
  File "/Users/grimen/.pyenv/versions/3.8.0/lib/python3.8/site-packages/connection_uri/uri.py", line 364, in unpack
    return self.deserialize(*args, **kwargs)
  File "/Users/grimen/.pyenv/versions/3.8.0/lib/python3.8/site-packages/connection_uri/uri.py", line 356, in deserialize
    raise URIError(error, details = {
connection_uri.uri.URIError: list index out of range - {'data': 'mongodb://localhost:27017{path.sep}{db_key}'}

----------------------------------------------------------------------
@grimen grimen added the bug Something isn't working label Jan 14, 2020
@grimen grimen self-assigned this Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant