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

URI#relative: AttributeError: 'NoneType' object has no attribute 'is_absolute' #30

Open
bossie opened this issue Nov 19, 2024 · 1 comment

Comments

@bossie
Copy link

bossie commented Nov 19, 2024

Example from the docs:

from uri import URI

base = URI("https://example.com/about/us")
cdn = base // "cdn.example.com"

cdn.relative  # boom!

Fails with:

Traceback (most recent call last):
  File "/home/bossie/opt/pycharm-community-2023.3.3/plugins/python-ce/helpers/pydev/pydevconsole.py", line 364, in runcode
    coro = func()
  File "<input>", line 6, in <module>
  File "/home/bossie/PycharmProjects/openeo/venv38/lib/python3.8/site-packages/uri/uri.py", line 254, in relative
    return scheme.is_relative(self)
  File "/home/bossie/PycharmProjects/openeo/venv38/lib/python3.8/site-packages/uri/scheme.py", line 48, in is_relative
    return not uri._host or not uri._path.is_absolute()
AttributeError: 'NoneType' object has no attribute 'is_absolute'
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
@bossie and others