0
type(object) prints <class 'list'> but creates an error when I try doing normal list operations with it. E.g len and insert
AttributeError: 'Nonetype' object has no attribute insert
3 Respostas
+ 1
Share your code so we can see the issue.
+ 1
If you're not able or willing to share a MWE of your code then the only other thing I can say that may help you is that obviously your variable is equal to None when you're performing whatever operation it is that results in the error. You may want to try and walk through your code with a debugger to watch the values and see if you can find the issue(s) yourself.
0
It involves working with a file so I can't