godot: Godot can't load CSV file as TextFile resource

Godot version: 3.2.1 (Stable)

OS/device including version: Manjaro

Issue description: Godot doesn’t seems to be able to load non-localization CSV files in the editor. Trying to load it in any export(Resource) var or export(TextFile) var gives:

ERROR: _load: Failed loading resource: res://test.csv.
   At: core/io/resource_loader.cpp:278.

and clicking it twice gives:

ERROR: load_resource: Condition "!res.is_valid()" is true. Returned: ERR_CANT_OPEN
   At: editor/editor_node.cpp:735.

Not sure if it is related, but are .txt files supposed to be hidden in Editor? Trying to change a .csv file to .txt makes it impossible to be selected as a file in the inspector.

Steps to reproduce: Any .CSV file in the project (imported as a normal CSV file, not localization) should be able to reproduce this.

Minimal reproduction project: Annexed to the issue. csv-problem.tar.gz

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 25 (14 by maintainers)

Most upvoted comments

That’s weird because there is a ‘normal’ CSV importing option on the file itself, along with the ‘Localization CSV’ option. If it can’t be imported as a regular resource, what is its purpose? Should I be able to import non-resource, non-object files to the project?

Same here. The CSV import option makes it unable to load the file in any exported game.

Moreover, if I RENAME the .csv file which imported as CSV in the filesystem dock to .txt file, the .csv.import file created by the editor will NOT be deleted, it’s just renamed to .txt.import and the content is untouched leaving something like:

[dep] source_file=“res://xxx.csv”

That makes the .txt file NOT packing into any export. Don’t know whether I should post this here or make a new issue.

The no-op “CSV” importer is removed by #47301 as it’s superseded by #47268 - you can now configure .csv files not to be imported at all, so you can parse them from script, and they will still be properly exported.

This doesn’t allow actually editing the CSV files in the GDScript editor, but this issue seems to have mostly comments related to the workflow of avoiding CSV files from being used as translations, which is now properly fixed. The whole TextFile business is quite limited in its current implementation (see #36297), and the needs for manual editing of CSV in the editor might be better served by https://github.com/godotengine/godot-proposals/issues/13.

Hello, I am having the same problem in godot 4 and I not found another post with this issue.

I can work with the csv files, the only problem is than upset me the 2 error lines for every csv file, even changed to UTF-8 and not worked and if I go to import window I can’t interact with they.

The txt works fine and delete the problem, but I want to have a few CSV, and I would like not change the file type every moment.

I am new in godot and there is so many thing than I don’t understand, I assume than there is a problem created just by me.

So the error above is normal?

Yes, I think it’s expected since importing it as a pure CSV file will make sure Godot doesn’t treat it as a translation during the exporting process.