Heroku Server not been updated

Hello there,

It seems that the server has not the latest changes that are on github(master branch). I have been deploying it several times, the server state is up and running but the new updates are not there.

Also when I go to logs it is empty.

Any hint…

Thanks
Geri

Hi Geri,

This means that there was a problem with the build or deployment. This is often caused by broken migrations or a python package that was added to Pipenv without Pipenv.lock being updated.

If you’ve manually modified existing migrations after a previous deployment you’ll need to revert your code and add additional migrations on top.

If you’ve added a new python package you’ll have to run pipenv lock and commit Pipenv.lock to the repo.

I have done pipenv lock and. I have commit it on the repo. Also all the migrations are in the repo. I can see from the interface that the build has been successfully… but without the latest changes

Why I see the logs tab empty without any error?

Hi @geri.enesi, sorry you’re having trouble with your build and release.

I can see that your build was successful, but your release has failed with the following message:

Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 361, in execute
    self.check()
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 390, in check
    include_deployment_checks=include_deployment_checks,
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/commands/migrate.py", line 65, in _run_checks
    issues.extend(super()._run_checks(**kwargs))
  File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 377, in _run_checks
    return checks.run_checks(**kwargs)
  File "/usr/local/lib/python3.6/dist-packages/django/core/checks/registry.py", line 72, in run_checks
    new_errors = check(app_configs=app_configs)
  File "/usr/local/lib/python3.6/dist-packages/django/core/checks/urls.py", line 13, in check_url_config
    return check_resolver(resolver)
  File "/usr/local/lib/python3.6/dist-packages/django/core/checks/urls.py", line 23, in check_resolver
    return check_method()
  File "/usr/local/lib/python3.6/dist-packages/django/urls/resolvers.py", line 399, in check
    for pattern in self.url_patterns:
  File "/usr/local/lib/python3.6/dist-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.6/dist-packages/django/urls/resolvers.py", line 584, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/usr/local/lib/python3.6/dist-packages/django/utils/functional.py", line 80, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "/usr/local/lib/python3.6/dist-packages/django/urls/resolvers.py", line 577, in urlconf_module
    return import_module(self.urlconf_name)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/webapp/snak_snak_16642/urls.py", line 27, in <module>
    path("api/v1/user/", include("users.api.v1.urls")),
  File "/usr/local/lib/python3.6/dist-packages/django/urls/conf.py", line 34, in include
    urlconf_module = import_module(urlconf_module)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/webapp/users/api/v1/urls.py", line 3, in <module>
    from users.api.v1.viewsets import ProfileUpdateView, ProfilePublicView, UserSettingsView, UserSearch, \
  File "/opt/webapp/users/api/v1/viewsets.py", line 4, in <module>
    from onesignal_sdk.error import OneSignalHTTPError
  File "/usr/local/lib/python3.6/dist-packages/onesignal_sdk/error.py", line 1, in <module>
    import httpx
  File "/usr/local/lib/python3.6/dist-packages/httpx/__init__.py", line 2, in <module>
    from ._api import delete, get, head, options, patch, post, put, request, stream
  File "/usr/local/lib/python3.6/dist-packages/httpx/_api.py", line 3, in <module>
    from ._client import Client, StreamContextManager
  File "/usr/local/lib/python3.6/dist-packages/httpx/_client.py", line 7, in <module>
    import httpcore
  File "/usr/local/lib/python3.6/dist-packages/httpcore/__init__.py", line 2, in <module>
    from ._async.connection_pool import AsyncConnectionPool
  File "/usr/local/lib/python3.6/dist-packages/httpcore/_async/connection_pool.py", line 15, in <module>
    from .._backends.auto import AsyncBackend, AsyncLock, AsyncSemaphore
  File "/usr/local/lib/python3.6/dist-packages/httpcore/_backends/auto.py", line 4, in <module>
    import sniffio
  File "/usr/local/lib/python3.6/dist-packages/sniffio/__init__.py", line 10, in <module>
    from ._impl import (
  File "/usr/local/lib/python3.6/dist-packages/sniffio/_impl.py", line 1, in <module>
    from contextvars import ContextVar
ModuleNotFoundError: No module named 'contextvars'

I encourage you to run the app locally with docker compose (all configuration files and instructions already included in your repository) to make sure you’re testing the same image in the same environment that will run in production.