Saturday, June 1, 2019

AttributeError: 'module' object has no attribute

Are you getting this type of error in your Python program?AttributeError: 'module' object has no attribute 'whatever' ? Well, then you might need to change the name of your python file.For example, save the following code in a file named json.py : import jsonprint json.dumps(['foo', {'bar': ('baz', None, 1.0, 2)}])Then try to run it, and you will get this error :$ python json.py Traceback (most recent call last):  File "json.py", line 1, in     import json  File... Original Source

https://codango.com/attributeerror-module-object-has-no-attribute/

I am happy to share this resource that we found. The content displayed on this page is property of its original author or their organization.

No comments:

Post a Comment