Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | marcorexo |
Hi
Problem 1:
Clicking and dragging a .csv file into the project file panel causes this error: ’ Error importing CSV translation: ‘statecode’ is not a valid locale’. It also causes Godot to show the file as a red icon in the folders panel.
I have tried several .csv files and get the same problem.
Problem 2:
Changing the file postfix to .txt causes Godot not to recognise the file as it does not appear in Godot’s folders panel. The following script prints “could not open file”:
if file.open(filename, file.READ) != 0:
print("opened file")
#get_csv_line ( String delim=”,” )
while not file.eof_reached():
var line = file.get_line()
result[str(index)] = line
index += 1
file.close()
else:
print("Could not open file")
pass
What am I doing wrong?
Thanks!
If you’re using 3.0+ of the engine, you may be able to still use the files even if they don’t show up in the editor. I think the editor only looks for files related to Godot, e.g. tscn, jpg, png, and json. I’ve been able to do this, yet the method to do that currently escapes me.
Ertain | 2019-02-11 23:52
I’m using 3.2.beta4
If your CSV file does not contain translation info, you need to re-import the resource as “CSV” (default = “CSV Translation”) ! The red cross will be replaced by another icon.
siska | 2020-01-04 13:52