HPC-ED / PEARC-Tutorial-2024

Sample scripts
1 stars 1 forks source link

python 3.12 SyntaxWarning: invalid escape sequence '-' #2

Open hscarter opened 3 months ago

hscarter commented 3 months ago

in python 3.12 there is a SyntaxWarning

SyntaxWarning: invalid escape sequence '-'

hscarter commented 3 months ago

A little more context, this shows up with any invocation of the HPC-ED_Search.py script for me. I am on a Mac with a conda virtual environment that pulled python (3.12.4), pandas (2.2.2), globus-cli (3.29.0), and globus-sdk (3.41.0) from conda-forge.

shm7 commented 3 months ago

Hi Haley,

Did you escape the dash, i.e. - ?

Thanks! Susan

From: Haley Carter @.> Date: Monday, July 22, 2024 at 4:15 PM To: HPC-ED/PEARC-Tutorial-2024 @.> Cc: Subscribed @.***> Subject: Re: [HPC-ED/PEARC-Tutorial-2024] python 3.12 SyntaxWarning: invalid escape sequence '-' (Issue #2)

A little more context, this shows up with any invocation of the HPC-ED_Search.py script for me. I am on a Mac with a conda virtual environment that pulled python (3.12.4), pandas (2.2.2), globus-cli (3.29.0), and globus-sdk (3.41.0) from conda-forge.

— Reply to this email directly, view it on GitHubhttps://github.com/HPC-ED/PEARC-Tutorial-2024/issues/2#issuecomment-2243737783, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC2PFEAVFE27NGTLOQY7JQLZNVR4XAVCNFSM6AAAAABLI7ZJDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTG4ZTONZYGM. You are receiving this because you are subscribed to this thread.Message ID: @.***>

shm7 commented 3 months ago

Ah, cancel my last question, this is in 3.12. The developer is looking into it now.

From: Haley Carter @.> Date: Monday, July 22, 2024 at 4:15 PM To: HPC-ED/PEARC-Tutorial-2024 @.> Cc: Subscribed @.***> Subject: Re: [HPC-ED/PEARC-Tutorial-2024] python 3.12 SyntaxWarning: invalid escape sequence '-' (Issue #2)

A little more context, this shows up with any invocation of the HPC-ED_Search.py script for me. I am on a Mac with a conda virtual environment that pulled python (3.12.4), pandas (2.2.2), globus-cli (3.29.0), and globus-sdk (3.41.0) from conda-forge.

— Reply to this email directly, view it on GitHubhttps://github.com/HPC-ED/PEARC-Tutorial-2024/issues/2#issuecomment-2243737783, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC2PFEAVFE27NGTLOQY7JQLZNVR4XAVCNFSM6AAAAABLI7ZJDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTG4ZTONZYGM. You are receiving this because you are subscribed to this thread.Message ID: @.***>

shm7 commented 3 months ago

Hi Haley,

The fix is being added to the repo right now. Basically, a quick fix is to add r in front of the triple string:

In line 93, ''' becomes r'''

in line 106, ''' becomes r'''

Thanks! Susan

From: Susan H. Mehringer @.> Date: Monday, July 22, 2024 at 4:36 PM To: HPC-ED/PEARC-Tutorial-2024 @.>, HPC-ED/PEARC-Tutorial-2024 @.> Cc: Subscribed @.> Subject: Re: [HPC-ED/PEARC-Tutorial-2024] python 3.12 SyntaxWarning: invalid escape sequence '-' (Issue #2) Ah, cancel my last question, this is in 3.12. The developer is looking into it now.

From: Haley Carter @.> Date: Monday, July 22, 2024 at 4:15 PM To: HPC-ED/PEARC-Tutorial-2024 @.> Cc: Subscribed @.***> Subject: Re: [HPC-ED/PEARC-Tutorial-2024] python 3.12 SyntaxWarning: invalid escape sequence '-' (Issue #2)

A little more context, this shows up with any invocation of the HPC-ED_Search.py script for me. I am on a Mac with a conda virtual environment that pulled python (3.12.4), pandas (2.2.2), globus-cli (3.29.0), and globus-sdk (3.41.0) from conda-forge.

— Reply to this email directly, view it on GitHubhttps://github.com/HPC-ED/PEARC-Tutorial-2024/issues/2#issuecomment-2243737783, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC2PFEAVFE27NGTLOQY7JQLZNVR4XAVCNFSM6AAAAABLI7ZJDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBTG4ZTONZYGM. You are receiving this because you are subscribed to this thread.Message ID: @.***>