[Answered ]-Invalid literal for int() with base 10 in my views after it worked a while

1👍

The first problem is that you should use int(float(uid2)) if uid2 is a string representing a float.
The second problem is that you uid2 represents a float using , instead of . (I don’t know if , is used for decimal points or as a thounsands separator) and you need to add a replace().

int(float(uid2.replace(",", "."))) if comma is used for decimal points
int(float(uid2.replace(",", ""))) if comma is used as a thounsands separator

Leave a comment