[Django]-Why is my Django App failing on Azure with UUID invalid syntax

0👍

Rebuilding virtual environment from scratch, regenerating the requirements.txt file and then redeploying resolved the issue.

2👍

Don’t leave uuid == 1.30 or any version in your requirements.txt. If you want to use uuid library, simply a import uuid is enough cuz it is built in python3 already. This solution works for me. I am using Python 3.9.7.
Here is my Azure error log with uuid == 1.30 included in requirements.txt. Hope this helps.
Azure log

1👍

This is syntax. In there were two types of integer values: int and long. long had an L suffix at the end. An int had a fixed range, long had an arbitrary range: it could represent numbers as long as there was sufficient memory.

One could specify with the L suffix that this was a long, not an int. For example in , one can write:

>>> type(1)
<type 'int'>
>>> type(1L)
<type 'long'>

In , the two merged together to int, and an int can represent arbitrary large numbers, so there is no need anymore for such suffix. You are thus using a library designed for with an interpreter that interprets .

I would advise not to use this (version of this) library. Take a look if there is a release for , or try to find an alternative. is no longer supported since january 1, 2020, so it is also not a good idea to keep developing on . Furthermore and differ in quite a large number of areas. It is not just an “extended” language. The way map and filter work is for example different. Therefore you better do not try to “fix” this issue, since likely a new one will pop up, or even worse, is hidden under the radar.

Leave a comment