spenceraxani / CosmicWatch-Desktop-Muon-Detector-v2

The CosmicWatch Desktop Muon Detector supplementary material
241 stars 70 forks source link

Importing Data errors #118

Open corymabry opened 3 months ago

corymabry commented 3 months ago

Hi, doing summer research with my university, last summer I used the import_data script to read data to my computer without issue at all via Visual Studio. I'm trying to do the same this summer but am getting various error messages that pertain to stuff such as unrecognized variables, import cannot be resolved, etc... I tried fixing manually some of the simpler ones like missing parentheses but it lead down a rabbit hole where more error messages just popped up. I could show some of the errors I'm receiving if the problem isn't something immediately obvious, any thoughts?

spenceraxani commented 3 months ago

Hi,

It sounds like your issue is that you aren’t running it with python. VS code requires you to specify a kernel. You shouldn’t have to modify anything in the code itself.

Best,

Spencer

─ Dr. Spencer N. Axani @. @.>

Assistant Professor The University of Delaware 203 Sharp Lab 104 The Green, Newark, DE 19716 (608) 572-8426

On Jun 3, 2024, at 9:18 AM, corymabry @.***> wrote:

Hi, doing summer research with my university, last summer I used the import_data script to read data to my computer without issue at all via Visual Studio. I'm trying to do the same this summer but am getting various error messages that pertain to stuff such as unrecognized variables, import cannot be resolved, etc... I tried fixing manually some of the simpler ones like missing parentheses but it lead down a rabbit hole where more error messages just popped up. I could show some of the errors I'm receiving if the problem isn't something immediately obvious, any thoughts?

— Reply to this email directly, view it on GitHub https://github.com/spenceraxani/CosmicWatch-Desktop-Muon-Detector-v2/issues/118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANF5O4AGBKFIP3R2WLN5ZTZFRULVAVCNFSM6AAAAABIWP7KROVHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZTCMJUGA3TAMA. You are receiving this because you are subscribed to this thread.

corymabry commented 3 months ago

Screenshot 2024-06-03 103759

I'm using Python 3.9, I've used this setup of VS to do a whole bunch of plotting, analyzing, and reading data in the past. Also worth noting if I use import_data_py2 (as opposed to last year successfully using import_data), I can get the prompt to run and select my intention, com port etc, but an error still occurs after it recognizes SD.ino.

spenceraxani commented 3 months ago

Ah, so that error that you show in your screenshot is regarding inconsistent use of tabs and spaces. I don’t know how to automatically fix that using VS Code, however with vim, you can do it by typing = G. Did you copy and paste the text into VSCode? Or did you open the file that you downloaded from the GitHub?

─ Dr. Spencer N. Axani @. @.>

Assistant Professor The University of Delaware 203 Sharp Lab 104 The Green, Newark, DE 19716 (608) 572-8426

On Jun 3, 2024, at 10:45 AM, corymabry @.***> wrote:

Screenshot.2024-06-03.103759.png (view on web) https://github.com/spenceraxani/CosmicWatch-Desktop-Muon-Detector-v2/assets/171580353/0ef41fbe-c1e5-4465-969d-ca793ba93f71 I'm using Python 3.9, I've used this setup of VS to do a whole bunch of plotting, analyzing, and reading data in the past. Also worth noting if I use import_data_py2 (as opposed to last year successfully using import_data), I can get the prompt to run and select my intention, com port etc, but an error still occurs after it recognizes SD.ino.

— Reply to this email directly, view it on GitHub https://github.com/spenceraxani/CosmicWatch-Desktop-Muon-Detector-v2/issues/118#issuecomment-2145389797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANF5O3WIOC6CPG57C5ZFFDZFR6PNAVCNFSM6AAAAABIWP7KROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBVGM4DSNZZG4. You are receiving this because you commented.

corymabry commented 3 months ago

Screenshot 2024-06-03 130427

The indents didn't appear to be wrong, I'm unsure why they were flagged. I used the indent fix shortcut, and still received the other errors. I downloaded the file and tried copy and pasting and faced the same result, along with more errors "statements must be separated by newlines or semi colons." I'm sure there must be something simple I'm overlooking but it's proving to be a real headscratcher thus far.