[BUG]:Contributing.rst instructions do not work #227

Closed
opened 2025-01-23 13:31:37 +00:00 by rsevs3 · 1 comment
rsevs3 commented 2025-01-23 13:31:37 +00:00 (Migrated from github.com)

Couple of improvements that could be made to contributing.rst

  • In the code snippets, remove the $ from the start, so you can copy/paste into the terminal.
  • When changing into the blog directory, there is no manage.py, perhaps there is a step missing?
  • When running pytest I am getting the error below:
Traceback (most recent call last):
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/bin/pytest", line 8, in <module>
    sys.exit(console_main())
             ~~~~~~~~~~~~^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 201, in console_main
    code = main()
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 156, in main
    config = _prepareconfig(args, plugins)
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 341, in _prepareconfig
    config = pluginmanager.hook.pytest_cmdline_parse(
        pluginmanager=pluginmanager, args=args
    )
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse
    config = yield
             ^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1140, in pytest_cmdline_parse
    self.parse(args)
    ~~~~~~~~~~^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1494, in parse
    self._preparse(args, addopts=addopts)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1398, in _preparse
    self.hook.pytest_load_initial_conftests(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        early_config=self, args=args, parser=self._parser
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/warnings.py", line 151, in pytest_load_initial_conftests
    return (yield)
            ^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 122, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
    ~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/capture.py", line 154, in pytest_load_initial_conftests
    yield
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pytest_django/plugin.py", line 355, in pytest_load_initial_conftests
    with _handle_import_error(_django_project_scan_outcome):
         ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 162, in __exit__
    self.gen.throw(value)
    ~~~~~~~~~~~~~~^^^^^^^
  File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pytest_django/plugin.py", line 183, in _handle_import_error
    raise ImportError(msg) from None
ImportError: No module named 'settings'

pytest-django could not find a Django project (no manage.py file could be found). You must explicitly add your Django project to the Python path to have it picked up.
Couple of improvements that could be made to contributing.rst - In the code snippets, remove the $ from the start, so you can copy/paste into the terminal. - When changing into the blog directory, there is no manage.py, perhaps there is a step missing? - When running pytest I am getting the error below: ``` Traceback (most recent call last): File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/bin/pytest", line 8, in <module> sys.exit(console_main()) ~~~~~~~~~~~~^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 201, in console_main code = main() File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 156, in main config = _prepareconfig(args, plugins) File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 341, in _prepareconfig config = pluginmanager.hook.pytest_cmdline_parse( pluginmanager=pluginmanager, args=args ) File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall raise exception.with_traceback(exception.__traceback__) File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 122, in _multicall teardown.throw(exception) # type: ignore[union-attr] ~~~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse config = yield ^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall res = hook_impl.function(*args) File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1140, in pytest_cmdline_parse self.parse(args) ~~~~~~~~~~^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1494, in parse self._preparse(args, addopts=addopts) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py", line 1398, in _preparse self.hook.pytest_load_initial_conftests( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ early_config=self, args=args, parser=self._parser ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 139, in _multicall raise exception.with_traceback(exception.__traceback__) File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 122, in _multicall teardown.throw(exception) # type: ignore[union-attr] ~~~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/warnings.py", line 151, in pytest_load_initial_conftests return (yield) ^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 122, in _multicall teardown.throw(exception) # type: ignore[union-attr] ~~~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/_pytest/capture.py", line 154, in pytest_load_initial_conftests yield File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall res = hook_impl.function(*args) File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pytest_django/plugin.py", line 355, in pytest_load_initial_conftests with _handle_import_error(_django_project_scan_outcome): ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.13/3.13.1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/contextlib.py", line 162, in __exit__ self.gen.throw(value) ~~~~~~~~~~~~~~^^^^^^^ File "/Users/ryan/Dev/Dunwright/django-tag-me/.venv/lib/python3.13/site-packages/pytest_django/plugin.py", line 183, in _handle_import_error raise ImportError(msg) from None ImportError: No module named 'settings' pytest-django could not find a Django project (no manage.py file could be found). You must explicitly add your Django project to the Python path to have it picked up. ```
imAsparky commented 2025-01-24 07:48:26 +00:00 (Migrated from github.com)

@rsevs3 Thanks for the feedback, this should fix the troubles you where encountering.

@rsevs3 Thanks for the feedback, this should fix the troubles you where encountering.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dunwright/django-tag-me#227
No description provided.