This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Serial library not found
Type: behavior Stage: resolved
Components: Extension Modules, IDLE, Windows Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: JuliusMiller, ezio.melotti
Priority: normal Keywords:

Created on 2012-07-10 02:09 by JuliusMiller, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg165141 - (view) Author: Julius (JuliusMiller) Date: 2012-07-10 02:09
I'm running ver 2.7 and added the serial library from source forge. here is the error I get:

Traceback (most recent call last):
  File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\Documents and Settings\Administrator\My Documents\WTF.py", line 3, in <module>
    import serial
ImportError: No module named serial

here is my code:
# Echo client program
import socket
import serial

HOST = '216.240.155.229'    # The remote host
PORT = 9090              # The same port as used by the server
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
ser = serial.Serial('USB0', timeout=3)
x = 0
#while x < 5:
while True:
    msg = ser.readline()
    s.send(msg)
    x += 1
s.close()
msg165144 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2012-07-10 02:21
This bug tracker is for reporting CPython bugs, so it's not the right place where to ask this kind of questions.
Anyway make sure that the "serial" module is in a directory that Python can see, e.g. the same dir where you have your script.
History
Date User Action Args
2022-04-11 14:57:32adminsetgithub: 59517
2012-07-10 02:21:45ezio.melottisetstatus: open -> closed

type: resource usage -> behavior
assignee: ezio.melotti

nosy: + ezio.melotti
messages: + msg165144
resolution: not a bug
stage: resolved
2012-07-10 02:09:50JuliusMillercreate