-
Notifications
You must be signed in to change notification settings - Fork 49
Fixed bug in reboot method #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reboot method gives us an error when executed, as it receives multiple lines but only expected one. If we add the `multiline=True` argument it runs without crashing.
We are not sure if this is laser specific behavior as we only have one iBeam smart 515nm laser and can't test it on others.
The error:
```
---------------------------------------------------------------------------
TopticaError Traceback (most recent call last)
Cell In[2], line 1
----> 1 laser.reboot()
File c:\Users\fulapuser\NOMAD-CAMELS\.desertenv\Lib\site-packages\pylablib\devices\Toptica\ibeam.py:100, in TopticaIBeam.reboot(self)
98 def reboot(self):
99 """Reboot the laser system"""
--> 100 self.query("reset system",reply=False,)
File c:\Users\fulapuser\NOMAD-CAMELS\.desertenv\Lib\site-packages\pylablib\devices\Toptica\ibeam.py:92, in TopticaIBeam.query(self, comm, multiline, keep_whitespace, check_error, reply)
90 for i in range(ntries):
91 try:
---> 92 return self._do_query(comm,multiline=multiline,keep_whitespace=keep_whitespace,check_error=check_error,reply=reply)
93 except TopticaError:
94 if i==ntries-1:
File c:\Users\fulapuser\NOMAD-CAMELS\.desertenv\Lib\site-packages\pylablib\devices\Toptica\ibeam.py:85, in TopticaIBeam._do_query(self, comm, multiline, keep_whitespace, check_error, reply)
83 return lines
84 elif len(lines)>1:
---> 85 raise TopticaError("expected single line, but got response {} with {} lines".format("\n".join(lines),len(lines)))
86 return lines[-1] if lines else None
TopticaError: expected single line, but got response SAVE:FSP
iBEAMsmart pulse option - Ultra Compact Diode Laser
(C)2009, TOPTICA Photonics AG
SerialN: iBEAM-SMART-515-S-A3-17694
PowerUP: 00357h
LaserON: 00062h
LDDinit: PASS
TECloop: LOOP
TECpass: WAIT����USER
LaserON: USER
Channel: USER
RFoscON: USER
PWRloop: USER
PDreset: USER
ExtModu: USER
SysBoot: DONE with 16 lines
```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The reboot method gives us an error when executed, as it receives multiple lines but only expected one. If we add the
multiline=Trueargument it runs without crashing. We are not sure if this is laser specific behavior as we only have one iBeam smart 515nm laser and can't test it on others.The error: