gtluu / timsconvert

https://gtluu.github.io/timsconvert/
Apache License 2.0
28 stars 16 forks source link

No module named 'requests' #45

Closed dtabb73 closed 11 months ago

dtabb73 commented 11 months ago

I've followed the instructions for the Anaconda install, leaving aside the NextFlow stuff. I had a panicky moment when I didn't know the path where git had installed the timsConvert, but eventually I found it. Frustratingly, when I run the software, I receive this error:

(timsconvert) C:\Windows\System32\timsconvert\bin>run.py --input "C:\Research\LC-MSMS_BakeOff\TIMS\HT_20230206_GenNext_0V_1_S1-B1_1_1482.d" Traceback (most recent call last): File "C:\Windows\System32\timsconvert\bin\run.py", line 1, in from timsconvert import * File "C:\Windows\System32\timsconvert\bin\timsconvert__init__.py", line 9, in import requests ModuleNotFoundError: No module named 'requests'

Fine! If requests isn't installed, I'll just install it. Here's the response:

(timsconvert) C:\Windows\System32\timsconvert\bin>pip install requests Requirement already satisfied: requests in c:\programdata\anaconda3\envs\timsconvert\lib\site-packages (2.27.1) Requirement already satisfied: idna<4,>=2.5 in c:\programdata\anaconda3\envs\timsconvert\lib\site-packages (from requests) (3.4) Requirement already satisfied: charset-normalizer~=2.0.0 in c:\programdata\anaconda3\envs\timsconvert\lib\site-packages (from requests) (2.0.12) Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\envs\timsconvert\lib\site-packages (from requests) (2022.12.7) Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\programdata\anaconda3\envs\timsconvert\lib\site-packages (from requests) (1.26.16)

I seem to be at a dead end. Does anyone have a suggestion for resolving this impasse?

gtluu commented 11 months ago

Hi @dtabb73, sorry to hear you're having these issues. Could you share the output when you use which conda and which python in the command line with the timsconvert venv activated? I suspect the system might have some confused Python PATHs (see here and here for more details).

dtabb73 commented 11 months ago

Hi! I tried to reproduce my problem with the software this evening, and strangely it all worked just fine. I am wondering if I installed the software in an administrator Anaconda command prompt and then tried to run it for the first time in a non-administrator Anaconda command prompt. In any case, this evening I've been able to execute the software when using both admin and non-admin Anaconda command prompts! The problem with 'requests' didn't materialize.

I did not see a command-line option for specifying that I want the software to sum together MS/MS data from adjoining ion mobility times to produce a higher-quality MS/MS. At the moment I am using a command-line like this: python run.py --input C:\Research\LC-MSMS_BakeOff\TIMS\HT_20230206_GenNext_10V_1_S1-C1_1_1483.d --mode centroid --compression zlib --verbose

My intent is to reproduce the TIMSConvert workflow in use over at ProteoSAFe. Thank you!

gtluu commented 11 months ago

No problem at all! If you do happen to reproduce the issue in the future, let us know. I will add that I've made some updates this week that include updates to the installation process, and I have a few more I am working on at the moment.

As far as summing the MS/MS data from separate ion mobility scans/times, if I'm understanding it correctly, that is currently not a function of TIMSCONVERT as my goal is to simply convert without too much data manipulation unless absolutely necessary. However, I'm happy to speak more about it if you need help on the TIMSCONVERT end. Something I am looking into separating some of the data access code out of TIMSCONVERT to make it more portable for myself and others to develop scripts/projects like that.