Skip to content

fix pathlib dependency bug in tutorial #429

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

duzhuoshanwai
Copy link

The associated issue (#347) and its linked pull request (#348) did not resolve the problem.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import sys; from importlib import import_module; sys.argv = ['/home/duzhuo/.pyenv/versions/3.14.0b1/envs/3.14-test/bin/start']; sys.exit(import_module('blog').run())
                                                                                                                                             ~~~~~~~~~~~~~^^^^^^^^
  File "/home/duzhuo/.pyenv/versions/3.14.0b1/lib/python3.14/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1398, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1371, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1342, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 938, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 762, in exec_module
  File "<frozen importlib._bootstrap>", line 491, in _call_with_frames_removed
  File "/home/duzhuo/src/quart/examples/blog/src/blog/__init__.py", line 16, in <module>
    "DATABASE": app.root_path / "blog.db",
                ~~~~~~~~~~~~~~^~~~~~~~~~~
TypeError: unsupported operand type(s) for /: 'str' and 'str'

I've resubmitted working code that aligns with the official tutorial (https://quart.palletsprojects.com/en/latest/tutorials/blog_tutorial.html).

@davidism davidism changed the title fix: pathlib dependency BUG in tutorial fix pathlib dependency bug in tutorial May 13, 2025
@duzhuoshanwai

This comment was marked as off-topic.

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

Successfully merging this pull request may close these issues.

1 participant