<div dir="ltr">Hi,<div>I have been trying to communicate through my usb port through as part of my project work. For this I have usb to serial converter installed in my system. I am working on python 3.4.3 and installed the serial module <a tabindex="0" class="" href="file:///C:/Users/shamsu/Desktop/hari/pyserial-2.7.win32_py3k.exe" style="text-decoration:none;display:inline-block;max-width:450px;word-break:break-all;font-family:'Segoe UI',Tahoma,sans-serif;font-size:12px">pyserial-2.7.win32_py3k.exe</a> downloaded from <a href="http://www.pyhton.org/">www.pyhton.org/</a>. My OS is 64 bit MS Windows 8.1. The trial programme i have been trying is </div><div><br></div><div><div>import serial</div><div>ser = serial.Serial(5)  </div><div>print (ser.portstr)       </div><div>ser.write("hello")      </div><div>ser.close()     </div><div><br></div><div>and this produces an error message  </div></div><div><br></div><div><div>COM6</div><div>Traceback (most recent call last):</div><div>  File "C:\Users\shamsu\Desktop\ff.py", line 4, in <module></div><div>    ser.write("hello")      # write a string</div><div>  File "C:\Python34\lib\site-packages\serial\serialwin32.py", line 283, in write</div><div>    data = to_bytes(data)</div><div>  File "C:\Python34\lib\site-packages\serial\serialutil.py", line 76, in to_bytes</div><div>    b.append(item)  # this one handles int and str for our emulation and ints for Python 3.x</div><div>TypeError: an integer is required</div><div><br></div><div>As a newer to the Python  i couldn't what the problem is and got stuck on it. </div></div><div>Expecting a solution to my problem.</div><div><br></div><div>Shamsudheen p</div></div>