Giter VIP home page Giter VIP logo

qcsapphire's People

Contributors

gadamc avatar mfparsons314 avatar

Watchers

 avatar  avatar

qcsapphire's Issues

unable to communicate with device

From @palnitishh


hi, I am trying to communicate to the COM4 in my case using
pulser = qcsapphire.Pulser('COM4')

but end up with error

IndexError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_8180\1879743324.py in
----> 1 pulser = qcsapphire.Pulser('COM4')

~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in init(self, port, timeout)
88 self.open()
89 self._command_history = collections.deque(maxlen=1000)
---> 90 self._read_hardware_versions()
91
92 ## PRIVATE

~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _read_hardware_versions(self)
175
176 def _read_hardware_versions(self):
--> 177 res_str = self.query('*IDN?')
178 _, model_number, serial_number, firm_fpga = res_str.split(',')
179 self.model_number = model_number

~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in query(self, data)
223 return_val = self._readlines()
224 else:
--> 225 return_val = self._readline()
226
227 return return_val

~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _readline(self)
162 '''
163 rdata = self._inst.readline()
--> 164 return self._check_error(rdata.decode('utf-8').strip())
165
166 def _readlines(self):

~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _check_error(self, string)
128 except Exception as e:
129 self._readlines() #flush out the read return on error to be ready for next query
--> 130 raise e
131
132 return string

~\AppData\Roaming\Python\Python39\site-packages\qcsapphire\pulser.py in _check_error(self, string)
107
108 try:
--> 109 if string[0] == '?':
110 if string[1] == '1':
111 raise Exception(f'Incorrect prefix, i.e. no colon or * to start command. Last write command == {self.last_write_command}')

IndexError: string index out of range

what do you think, am I mising some prequisites or something else is wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.