Closed JV-conseil closed 4 years ago
@JV-conseil Thanks for the detailed issue report. This issue does not seem to be related to Oryx as such. Are you able to run this app successfully locally? Check if the following can help: https://stackoverflow.com/questions/38513827/django-json-field-module-object-has-no-attribute-jsonfield
@kichalla Thanks for your answer.
I am able indeed to run the app successfully locally: the error occurs when pushing to Azure.
I've opened a ticket on Django if you think it is not Oryx related: https://code.djangoproject.com/ticket/32081#ticket
Here is Django
's reply:
Sorry, but this looks like as a configuration (or Azure?) related issue. Nothing shows that Django is doing anything wrong in your code excerpts. Try to use support channels. — https://code.djangoproject.com/ticket/32081#comment
Interesting. @JV-conseil could you share the content of your app's requirements.txt
file? Does it have jsonfield
in it as specified in the StackOverflow issue that I pointed earlier? Would it be possible to give us a minimal repro app?
@kichalla The StackOverflow link you've shared is "outdated" in regard to Django v3.1 and JSONField, you no longer need to load extra packages in your requirements.txt
file.
Furthermore, the app should crash while running locally as well, if as suggested in the StackOverflow issue a Json package was missing in my requirements.txt
file, which does not happen.
Here is the Django documentation: https://docs.djangoproject.com/en/3.1/releases/3.1/#jsonfield-for-all-supported-database-backends
And my StackOverflow issue: https://stackoverflow.com/questions/63640881/attributeerror-module-django-db-models-has-no-attribute-jsonfield
@JV-conseil Could you share a simple repro for us? It will help us to quickly reproduce and verify the issue.
gentle ping
@kichalla Sorry for the late reply… due to an unexplained resolution of the issue: the app is stable for a week and no longer crashing even though I did not make any change.
Oryx Version: 0.2.20200917.1,
Commit: 59deb778658a124cb74ea8e2c8f39fa87abcc9d9, ReleaseTagName: 20200917.1
Bug Report
At what date and time did you most recently experience the problem? October, 6th 2020 22:36:31 UTC+1
Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use. Azure Web Apps
If your repo is publicly available please share its URL: Private repo
What happened? Oryx ignores Django v.3.1 new JSONField in django.db.models
What did you expect or want to happen? Build a new container compatible with Django v.3.1
How can we reproduce it? 🤷♂️
Do you have log output? Please include between the backticks:
Following
Django 3.1
guidelines forJSONField
for all supported database backends… https://docs.djangoproject.com/en/3.1/releases/3.1/#jsonfield-for-all-supported-database-backends… ends up with error on
Azure Web App
:Requirements.txt
file specifies Django >= 3.1:App Service Built
console:Oryx
console: