Open beejay4l opened 7 years ago
You are trying to open a directory as a file. Remove trailing \
from path to name the File. Also Backslahes needed to be escaped, or the string must be a raw string (e.g. r"here comes a windows path"
)
You also spelled Argument
incorrectly :p
string=radar.metadata['start_datetime']
type(string) out: str
print(string) out: 2019-02-07T00:14:24Z
pyart.io.write_grid_mdv ( '{}.mdv' .format(string),grid,mdv_field_names=None, field_write_order=None) out: OSError Traceback (most recent call last)
On e.g. Windows :
is not a valid char for a filename. Compare with e.g. c:\
where it has a special meaning
Hello guys,
I am entirely new to programming, but I'm trying to do something with Python programming. I'm trying to run open file command in Sublime Text 3 and I've been having this error. Please see below:
error file.txt
Traceback (most recent call last): File "C:\Users\Awesome God\Desktop\test.py", line 2, in
file = open("C:\Users\Awesome God\Desktop\test.txt\", "r")
OSError: [Errno 22] Invalid argument: 'C:\Users\Awesome God\Desktop\test.txt\'
[Finished in 0.3s]
Any solution to this, please?