question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`gulp migrate` failing in Gitpod

See original GitHub issue

Starting a new Gitpod environment is resulting in –

[15:15:56] Using gulpfile /workspace/babybuddy/gulpfile.js
[15:15:56] Starting 'migrate'...
Traceback (most recent call last):
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 86, in wrapped
    saved_locale = translation.get_language()
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/utils/translation/__init__.py", line 254, in get_language
    return _trans.get_language()
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/utils/translation/__init__.py", line 57, in __getattr__
    if settings.USE_I18N:
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/home/gitpod/.pyenv/versions/3.8.12/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named '"babybuddy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 27, in <module>
    execute_from_command_line(sys.argv)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/core/management/base.py", line 367, in run_from_argv
    connections.close_all()
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/db/utils.py", line 208, in close_all
    for alias in self:
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/utils/connection.py", line 73, in __iter__
    return iter(self.settings)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/utils/functional.py", line 48, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/utils/connection.py", line 45, in settings
    self._settings = self.configure_settings(self._settings)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/db/utils.py", line 144, in configure_settings
    databases = super().configure_settings(databases)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/utils/connection.py", line 50, in configure_settings
    settings = getattr(django_settings, self.settings_name)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 82, in __getattr__
    self._setup(name)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 69, in _setup
    self._wrapped = Settings(settings_module)
  File "/workspace/babybuddy/.venv/lib/python3.8/site-packages/django/conf/__init__.py", line 170, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/home/gitpod/.pyenv/versions/3.8.12/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named '"babybuddy'
[15:15:57] 'migrate' errored after 1.08 s
[15:15:57] Error: 1
    at formatError (/home/gitpod/.nvm/versions/node/v16.11.0/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js:21:10)
    at Gulp.<anonymous> (/home/gitpod/.nvm/versions/node/v16.11.0/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js:33:15)
    at Gulp.emit (node:events:402:35)
    at Gulp.emit (node:domain:475:12)
    at Object.error (/workspace/babybuddy/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
    at handler (/workspace/babybuddy/node_modules/now-and-later/lib/map.js:50:14)
    at f (/workspace/babybuddy/node_modules/once/once.js:25:25)
    at f (/workspace/babybuddy/node_modules/once/once.js:25:25)
    at tryCatch (/workspace/babybuddy/node_modules/async-done/index.js:24:15)
    at ChildProcess.done (/workspace/babybuddy/node_modules/async-done/index.js:40:12)

when running the gulp migrate command. The relevant error there is ModuleNotFoundError: No module named '"babybuddy'. This definitely worked before and as far as I know nothing has changed with the Gitpod config.

Running env in Gitpod after a failed setup shows DJANGO_SETTINGS_MODULE="babybuddy.settings.development". Running export DJANGO_SETTINGS_MODULE=babybuddy.settings.development resolves the issue as gulp migrate works and the env output is now DJANGO_SETTINGS_MODULE=babybuddy.settings.development.

The .gitpod.yml file does not contain the double quotes so I’m not quite sure what to try to address this.

@lutzky, any ideas?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cdubzcommented, Oct 25, 2021

Thanks for confirming!

1reaction
Alberdicommented, Oct 25, 2021

The whole Gitpod integration is now working, so this issue can be closed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migrating a Gulpfile from Gulp 3.9.1 to 4.0.2 - gists · GitHub
For the most part, I fed arrays of globs into my tasks, not 'singular globs'. It seemed that glob arrays failed if any...
Read more >
Gitpodifying — The Ultimate Guide
In this guide, I will be using Gitpod, a free developer service that makes it easy for maintainers to automate any non-executable setup ......
Read more >
Gulp failed after push - node.js - Stack Overflow
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >
Gitpod integration - GitLab Docs
Go to your merge request. In the upper right corner, select Code, then select Open in Gitpod. Gitpod builds your development environment for...
Read more >
How to Migrate to Gulp.js 4.0 - SitePoint
The following sections use the CSS tasks tutorial code as an example. The code is available on GitHub and provides the original Gulp.js...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found