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

No module named 'django_browser_reload' in deployment #34

Closed
YDX-2147483647 opened this issue Aug 10, 2023 · 1 comment · Fixed by #38
Closed

No module named 'django_browser_reload' in deployment #34

YDX-2147483647 opened this issue Aug 10, 2023 · 1 comment · Fixed by #38
Assignees
Labels
type: bug Something isn't working.

Comments

@YDX-2147483647
Copy link
Collaborator

YDX-2147483647 commented Aug 10, 2023

按照doc/deploy.md操作,migrate 会失败。

  File "…\contest-bitnp\contest\contest\urls.py", line 28, in <module>
    path("__reload__/", include("django_browser_reload.urls")),
  File "…\contest-bitnp\.venv\lib\site-packages\django\urls\conf.py", line 38, in include
    urlconf_module = import_module(urlconf_module)
  File "…\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django_browser_reload'

不知 CI 能过。这大约因为缓存了 dev 的包,注意poetry install时提示 No dependencies to install or update。

@YDX-2147483647 YDX-2147483647 added the type: bug Something isn't working. label Aug 10, 2023
@YDX-2147483647
Copy link
Collaborator Author

YDX-2147483647 commented Aug 11, 2023


Besides, it's possible to cache the poetry installation.

In addition to caching your python dependencies you might find it useful to cache the Poetry installation itself. This should cut ~10 seconds of your total runtime and roughly 95% of this action's runtime.

      - name: Load cached Poetry installation
        id: cached-poetry
        uses: actions/cache@v3
        with:
          path: ~/.local  # the path depends on the OS
          key: poetry-0  # increment to reset cache
      - name: Install Poetry
        if: steps.cached-poetry.outputs.cache-hit != 'true'
        uses: snok/install-poetry@v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant