SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
Please post code in pre-formatted text tags, not as screen shots.
Also please post all of the error message.
Use the </> button like this.
```
def example():
print(“hello”)
```
1 Like
It will enable someone to help you if you post a minimal extract of the file that still causes the error, and the complete error message Minase.
I can’t reproduce the issue from guesswork and a screenshot alone (Json just leaves values with leading zeros as strings):
>>>s = io.StringIO('01,02,abc\n03,04,def')
>>> json.dumps(list(csv.reader(s)))
'[["01", "02", "abc"], ["03", "04", "def"]]'
1 Like
Try to use constants with non-octal digits, e.g. “08” or “0789“.
Update: AFAIK csv module by default parses all items as strings.
I’ve got similar error when passing .CSV file to python3 binary as python script.