Skip to content
Home » Python AttributeError: ‘module’ object has no attribute ‘Serial’

Python AttributeError: ‘module’ object has no attribute ‘Serial’

To solve Python AttributeError: ‘module’ object has no attribute ‘Serial’ error follow below methods.

ERROR LOG

Python AttributeError: ‘module’ object has no attribute ‘Serial’

How to solve Python AttributeError: ‘module’ object has no attribute ‘Serial’ ?

In most circumstances, rename your project file ‘serial.py’ and delete serial.pyc if it exists, then import serial without an attribute error.

The issue arises when you import ‘something’ when the name of your Python file is ‘something.py’.

pip install pyserial

Hope the above solution works.

Also read :

Python AttributeError: ‘module’ object has no attribute ‘Serial’
‘NoneType’ object has no attribute ‘append’