matijakolaric-com / django-music-publisher

Software for managing music metadata, registration/licencing of musical works and royalty processing.
https://django-music-publisher.readthedocs.io
MIT License
62 stars 40 forks source link

Heroku deployment template does not work #34

Closed maximedupre closed 3 years ago

maximedupre commented 3 years ago

I entered all the required fields (PUBLISHER, PUBLISHER_IPI_NAME, PUBLISHER_SOCIETY_PR), but the "Build app" phase failed.

-----> Python app detected
-----> Installing python-3.8.7
-----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
-----> Installing SQLite3
-----> Installing requirements with pip
       Collecting Django<3.2,>=3.1.4
         Downloading Django-3.1.5-py3-none-any.whl (7.8 MB)
       Collecting dj_database_url
         Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
       Collecting psycopg2-binary
         Downloading psycopg2_binary-2.8.6-cp38-cp38-manylinux1_x86_64.whl (3.0 MB)
       Collecting waitress
         Downloading waitress-1.4.4-py2.py3-none-any.whl (58 kB)
       Collecting whitenoise
         Downloading whitenoise-5.2.0-py2.py3-none-any.whl (19 kB)
       Collecting asgiref<4,>=3.2.10
         Downloading asgiref-3.3.1-py3-none-any.whl (19 kB)
       Collecting pytz
         Downloading pytz-2020.5-py2.py3-none-any.whl (510 kB)
       Collecting sqlparse>=0.2.2
         Downloading sqlparse-0.4.1-py3-none-any.whl (42 kB)
       Installing collected packages: asgiref, pytz, sqlparse, Django, dj-database-url, psycopg2-binary, waitress, whitenoise
       Successfully installed Django-3.1.5 asgiref-3.3.1 dj-database-url-0.5.0 psycopg2-binary-2.8.6 pytz-2020.5 sqlparse-0.4.1 waitress-1.4.4 whitenoise-5.2.0
-----> $ python manage.py collectstatic --noinput
       Traceback (most recent call last):
         File "manage.py", line 15, in <module>
           execute_from_command_line(sys.argv)
         File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
           utility.execute()
         File "/app/.heroku/python/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
           django.setup()
         File "/app/.heroku/python/lib/python3.8/site-packages/django/__init__.py", line 24, in setup

Is it possible to update the template?

Cheers!

EDIT

Ah, nvm, I was missing a part of the stack trace. Seems like my PUBLISHER_SOCIETY_PR isn't valid (I replaced with X)?

apps.populate(settings.INSTALLED_APPS)
         File "/app/.heroku/python/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
           app_config.ready()
         File "/tmp/build_9856883c_/music_publisher/apps.py", line 24, in ready
           validate_settings()
         File "/tmp/build_9856883c_/music_publisher/validators.py", line 202, in validate_settings
           raise ImproperlyConfigured(
       django.core.exceptions.ImproperlyConfigured: PUBLISHER_SOCIETY_PR: Unknown society code "XXXXXXXX".
 !     Error while running '$ python manage.py collectstatic --noinput'.
       See traceback above for details.
       You may need to update application code to resolve this error.
       Or, you can disable collectstatic for this application:
          $ heroku config:set DISABLE_COLLECTSTATIC=1
       https://devcenter.heroku.com/articles/django-assets
 !     Push rejected, failed to compile Python app.
 !     Push failed
maximedupre commented 3 years ago

It works when using a valid PUBLISHER_SOCIETY_PR