convert a code from java into python -


now trying change program java python, when fix 3 problems on code , run it. shows me error.

traceback (most recent call last):   file "serial.py", line 4, in <module>     import serial   file "/home/pi/serial.py", line , in <module>     port=serial.serial( attributeerror:'module' object has no attribute 'serial' 

how can fix it?

if need source code , problems had fix, let me know. please me it.

you've named file serial.py or maybe serial.py. rename file else, "testserial.py" if you're desperate keep name.

golden rule of python: never give file same name module importing from


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -