Hi Colin,
we found an error in the picoscope/ps2000a.py file regarding the serial number handling and fixed it in my fork of your repo.
This is where the issue is located, in picoscope/ps2000a.py (version 0.7.31), in method _lowLevelOpenUnit() :

Then inside "create_string_buffer()"...

... which raises in Visual Code debugger :

The solution is to correct _lowLevelOpenUnit() :

as it's already done in ps5000a.py, for example.
The Fix is implemented in #213
Best regards
Claudio