WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-04-2021, 02:08 AM
victorhe victorhe is offline
Registered User
 
Join Date: Feb 2021
Posts: 2
Import Serial Port Error

Hey, apologies for this very basic question. I am working in a clinical neuroscience lab and need help with Import Serial.
I have already installed pyserial in the Packages and I am currently using the USB TTL event marking module connected to BIOPAC.
I am trying to use this code:

import serial
ser = serial.Serial(0, 115200, timeout=1)
ser.write('01')
ser.write('00')
ser.close()

But I keep getting this error:

Traceback (most recent call last):
File "<string>", line 12, in <module>
File "C:\Users\FiercePC\Documents\Work\VR\Code.py", line 27, in <module>
ser = serial.Serial(0, 115200, timeout=1)
File "C:\Program Files\WorldViz\Vizard7\bin\lib\site-packages\pyserial-3.5-py3.8.egg\serial\serialwin32.py", line 33, in __init__
File "C:\Program Files\WorldViz\Vizard7\bin\lib\site-packages\pyserial-3.5-py3.8.egg\serial\serialutil.py", line 222, in __init__
File "C:\Program Files\WorldViz\Vizard7\bin\lib\site-packages\pyserial-3.5-py3.8.egg\serial\serialutil.py", line 268, in port
ValueError: "port" must be None or a string, not <class 'int'>

Can someone help? Thanks
Reply With Quote
 

Tags
error, import serial, port, serial, vizard

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pylink Import Error chris2307 Vizard 8 03-21-2014 03:07 AM
How to create AMTI AccuGait force plate plug-in using serial port connection? manueleh Plug-in development 0 09-20-2012 01:22 PM
Question about serial port mizutani_jun Plug-in development 6 11-21-2010 03:53 PM
Biopac Parallel Port Writer Error: missing INPOUT32.dll mmatlock Vizard 1 06-30-2010 02:04 PM
A simple Plug_in for reading data from serial port sled Plug-in development 0 08-12-2003 09:52 AM


All times are GMT -7. The time now is 08:28 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC