Errors and Solutions Documentation
1. SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers
2. ModuleNotFoundError: No module named 'utils'
Solution:
1 2 |
|
3. ImportError: cannot import name 'failure_count' from 'testUtils'
Solution:
Actual issue: the function was missing.
4. SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...) ?
5. TypeError: can only concatenate str (not "int") to str
6. NameError: name 'hoistedVariable' is not defined
Solution:
This occurs due to undefined errors.
7. TypeError: greet() missing 1 required positional argument: 'name'
8. SyntaxError: non-default argument follows default argument
9. TypeError: isEligibleToVote() missing 1 required positional argument: 'aaaa'
Solution:
We should provide a default value, or else it will be considered a required parameter.
10. ValueError: Exceeds the limit (4300 digits) for integer string conversion: value has 5000 digits; use sys.set_int_max_str_digits() to increase the limit
Solution:
You need to set the value like:
1 |
|
11. SyntaxError: trailing comma not allowed without surrounding parentheses
Solution:
The import statement should not end with a comma.
12. AttributeError: 'str' object has no attribute 'reversed'
Solution:
There is no method called reversed
for strings.
13. TypeError: 'palindromSolutions' object is not callable
Solution:
This occurs when you try to call the class as a function.