michalsta / opentims

Open-source C++ and Python module for opening binary timsTOF data files.
Other
41 stars 11 forks source link

import error #19

Open yingxue-fu opened 1 year ago

yingxue-fu commented 1 year ago

I installed the package successfully on windows, but I met the following error when loading the package.

Version: opentimspy: 1.0.15 pybind11: 2.10.4 numpy: 1.23.5

from opentimspy.opentims import OpenTIMS Traceback (most recent call last):

Cell In[11], line 1 from opentimspy.opentims import OpenTIMS

File ~\AppData\Local\miniconda3\envs\opentims\lib\site-packages\opentimspy__init__.py:71 from opentimspy.opentims import OpenTIMS, column_to_dtype, all_columns, all_columns_dtype

File ~\AppData\Local\miniconda3\envs\opentims\lib\site-packages\opentimspy\opentims.py:67 COLUMNS_TYPE = typing.Union[str, tuple[str, ...]]

TypeError: 'type' object is not subscriptable

MatteoLacki commented 1 year ago

Hello,

This looks like a you would be using python<3.10. I can fix that error.

Best wishes,

MatteoLacki commented 1 year ago

I pushed it out on github: can you have a look if it now works for you before the code makes it to the pypi repo?

ehwmatt commented 1 year ago

I am also getting the above error running on Python 3.8.16. Can you advise how to avoid this? Example error message:

`import pathlib from pprint import pprint from opentimspy.opentims import OpenTIMS Traceback (most recent call last):

Cell In[13], line 3 from opentimspy.opentims import OpenTIMS

File ~\anaconda3\envs\tims_env\lib\site-packages\opentimspy__init__.py:71 from opentimspy.opentims import OpenTIMS, column_to_dtype, all_columns, all_columns_dtype

File ~\anaconda3\envs\tims_env\lib\site-packages\opentimspy\opentims.py:67 COLUMNS_TYPE = typing.Union[str, tuple[str, ...]]

TypeError: 'type' object is not subscriptable`

Thanks for your help!!

Matt

MatteoLacki commented 1 year ago

Hello,

this is an incompatibility with python 3.8. Please update for now, we're on it.

Best,

Mateusz Krzysztof Łącki

tel. +49 159 01681376

GitHub: MatteoLacki https://github.com/MatteoLacki

On Mon, Jul 3, 2023 at 2:36 PM Matt White @.***> wrote:

I am also getting the above error running on Python 3.8.16. Can you advise how to avoid this? Example error message:

`import pathlib from pprint import pprint from opentimspy.opentims import OpenTIMS Traceback (most recent call last):

Cell In[13], line 3 from opentimspy.opentims import OpenTIMS

File ~\anaconda3\envs\timsenv\lib\site-packages\opentimspyinit_.py:71 from opentimspy.opentims import OpenTIMS, column_to_dtype, all_columns, all_columns_dtype

File ~\anaconda3\envs\tims_env\lib\site-packages\opentimspy\opentims.py:67 COLUMNS_TYPE = typing.Union[str, tuple[str, ...]]

TypeError: 'type' object is not subscriptable`

Thanks for your help!!

Matt

— Reply to this email directly, view it on GitHub https://github.com/michalsta/opentims/issues/19#issuecomment-1618181070, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6H2ADOEGRKUMLF6WF4JGLXOK4GHANCNFSM6AAAAAAW3ZVQPY . You are receiving this because you commented.Message ID: @.***>

ehwmatt commented 11 months ago

Thanks very much, solved!

Matt