Skip to content
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

Version 2.0.1 crashes on read #148

Closed
drmcnelson opened this issue Jan 20, 2022 · 12 comments · Fixed by #149
Closed

Version 2.0.1 crashes on read #148

drmcnelson opened this issue Jan 20, 2022 · 12 comments · Fixed by #149

Comments

@drmcnelson
Copy link

drmcnelson commented Jan 20, 2022

spectrometer and system information

  • model: (i.e. USB2000, STS, etc...)

USB2000+

  • operating system: (i.e. Windows 7 64bit)

Fedora 35

  • python version: (output of python --version)

Python 3.10.1

  • python-seabreeze version: (i.e. 0.5.3 or 'current master')

python seabreeze 2.0.1

  • installed-via: (conda, wheel, or python setup.py install)

sudo pip install seabreeze[pyseabreeze] --no-use-pep517 --no-build-isolation --install-option="--without-cseabreeze" --no-cache-dir

current problem

The intensities() api is broken, produces the following error message.

This is specific to 2.0.1, I uninstalled it and installed 1.3.0 in its place, and that earlier version works perfectly.

steps to reproduce

Run any simple program with the call to intensities().

File "/usr/local/lib/python3.10/site-packages/seabreeze/spectrometers.py", line 212, in intensities
out = self._dev.f.spectrometer.get_intensities()
File "/usr/local/lib/python3.10/site-packages/seabreeze/pyseabreeze/features/spectrometer.py", line 147, in get_intensities
tmp = self._get_spectrum_raw()
File "/usr/local/lib/python3.10/site-packages/seabreeze/pyseabreeze/features/spectrometer.py", line 167, in _get_spectrum_raw
tmp[:] = self.protocol.receive(
ValueError: invalid literal for int() with base 10: b'\x07\x00\xf6-H\x02<\x02-\x02N\x02&\x02E\x02.\x02I\x02V\x02a\x02Q\x02e\x02Z\x02h\x02l\x02q\x02g\x02\x8b\x02\xa3\x02\x96\x02\x92\x02\xa1\x02\x9e\x02\xab\x02\xa3\x02\x9c\x02\xc7\x02\xa9\x02\xcd\x02\xd2

@ap--
Copy link
Owner

ap-- commented Jan 20, 2022

Hey @drmcnelson,

This is a regression due to some refactoring within pyseabreeze.
I'll try to get a fix out soon.

Thanks for reporting!
Cheers,
Andreas 😃

@ap-- ap-- self-assigned this Jan 20, 2022
ap-- added a commit that referenced this issue Jan 20, 2022
@ap--
Copy link
Owner

ap-- commented Jan 20, 2022

https://github.com/ap--/python-seabreeze/actions/runs/1725616126

There's new wheels ready for download on the current PR where I try to fix the described issue.

Could you download the wheels artifact from the link above, extract it, and install the corresponding wheel for your os and python version and test if it works?

Cheers,
Andreas 😃

@drmcnelson
Copy link
Author

drmcnelson commented Jan 20, 2022 via email

@drmcnelson
Copy link
Author

Another bug, perhaps, the following installation command line produces an error that option "--without-cseabreeze" is not recognized.

sudo pip install seabreeze[pyseabreeze] --no-use-pep517 --no-build-isolation --install-option="--without-cseabreeze"

@ap--
Copy link
Owner

ap-- commented Jan 21, 2022

Once v2.0.2 is out you should just be able to do:
(This pipeline has to finish to upload the new wheels: https://github.com/ap--/python-seabreeze/actions/runs/1728412220)

pip install -U seabreeze

and it should work.

Regarding the issue with

pip install seabreeze[pyseabreeze] --no-use-pep517 --no-build-isolation --install-option="--without-cseabreeze"

I would need more information about your current environment. please run pip freeze and report back with the versions of installed python libraries on your machine.

In case v2.0.2 fixes the original issue, please close this issue 😃

@drmcnelson
Copy link
Author

Hi, here is the pip freeze. If you can tell me how to download and install the wheel, I can give it a try.

pip.freeze.txt

@ap--
Copy link
Owner

ap-- commented Jan 21, 2022

Sorry, could you run pip freeze --all?

And installing the wheel is not necessary. I made a new release, so just running pip install -U seabreeze on your machine should install v2.0.2 with the newest fixes.

Cheers,
Andreas 😃

@drmcnelson
Copy link
Author

pip.freeze.all.txt

@ap--
Copy link
Owner

ap-- commented Jan 23, 2022

Thanks for the info. I moved the discussion regarding the pip install problems to a new issue: #150

In case version v2.0.2 fixes the issue regarding crashes on .read please close this issue.

Cheers,
Andreas 😃

@drmcnelson
Copy link
Author

drmcnelson commented Jan 23, 2022 via email

@drmcnelson
Copy link
Author

Version 2.0.2 seems to be a winner. Installs easily and runs well.

Thank you

@ap--
Copy link
Owner

ap-- commented Jan 25, 2022

Awesome. Great that it works!

Regarding the ADC1000USB, I'll open another issue for improving the docs on how to add new spectrometers and I'll start a draft pull-request sketching out what needs to be done to integrate the adc1000usb code.

Cheers,
Andreas 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants