I'm currently working on a project on Atom using Teletype (so I can work on Discord with somebody). The code is working fine locally. But, when I try to run it using Teletype (my friend is hosting), it fails like that:
python: can't open file
'C:Pythoncode_perso@Turelure13:Pythoniocapteur_first_step.py':
[Errno 22] Invalid argument'
I assumed I should define the path differently but locally it's OK for both of us. So, it might be the path added by teletype that induce an error.. Also, I'm on Windows and my friend on Unix.
import numpy as np
import pandas as pd
from pathlib import Path #Offers classes representing filesystem paths with semantics appropriate for different OS.
import matplotlib.pyplot as plt
DATA_PATH = Path("Spectre TFBG.txt")
data = pd.read_csv(DATA_PATH, sep='', skiprows=[0,1,2,3,4,5,6], header=0, skipfooter=0, engine='python')
data2 = data.drop(columns=['X Axis - Frequency (GHz)'])
print(data2)
#Ecriture du fichier CSV
data2.to_csv('newdata_modified.csv')
question from:
https://stackoverflow.com/questions/66047713/path-error-using-atom-teletype-on-both-mac-and-windows 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…