Skip to content

IMAQdx Camera worker fails if Numpy >= 2.0 #131

@mjdoris

Description

@mjdoris

Hello, we encountered this issue yesterday. I was tempted to make the change, but instead decided to just downgrade numpy to something below 2.0. I looked at the dependencies in the toml project file and see it lists numpy>=1.15.1, which could create a situation where numpy 2.0 is installed and cause this error. I'm not sure if it would be better to add that numpy should also be < 2.0 in the dependencies, or change all instances of string_ to bytes_.

Traceback (most recent call last):
  File "C:\LabscriptSuite\labscript-devices\labscript_devices\IMAQdxCamera\blacs_workers.py", 
line 484, in transition_to_manual
    dset.attrs['CLASS'] = np.string_('IMAGE')
                          ^^^^^^^^^^
  File "C:\Users\rubidium\Anaconda3\envs\labscript_env\Lib\site-packages\numpy\__init__.py", line 400, 
in __getattr__
    raise AttributeError(
AttributeError: `np.string_` was removed in the NumPy 2.0 release. Use `np.bytes_` instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions