Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
A-D-Fuchs wants to merge 1 commit into AlexShkarin:main
base: main
Choose a base branch
Loading
from A-D-Fuchs:patch-1

Conversation

@A-D-Fuchs
Copy link

@A-D-Fuchs A-D-Fuchs commented Apr 12, 2024

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

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /