Closed CloudyPadmal closed 3 years ago
What behavior would you prefer? pslab-python currently offers no functionality without a connected device, so a "Device not found" exception seems fine to me.
I was thinking something like just the error message without the whole error log :thinking:
I can see two ways to accomplish that, neither of which I like:
except SerialException as e: print(e)
Exceptions should not be caught without good reason, and wanting to show the user a nicer looking error message is not a good enough reason.import sys; sys.tracebacklimit = 0
Less bad, but why only here? Should we suppress the traceback throughout the whole library? That would be a terrible idea, and I don't see why this exception deserves special treatment.If we want to enhance the user experience, we should create a simple CLI application. Adding this kind of hack to the base library only complicates troubleshooting.
I opened an issue to create a CLI: #146
Do you think that is an OK solution?
Yes, I think that would be a good approach :+1: I'll close this issue to continue.
When a user tries the PSL library without any device connected, the following error message is thrown.
@bessman May be we better handle it gracefully?