Sys.load_resource warning spam (DEF-1116) (#4172) (SOLVED)

I am using sys.load_resource to find some files. I have several paths, so I check filename in every path.
And I get a lot of
WARNING:SCRIPT: Failed to load resource: filename (-3)

And I cant use io to load resource from resources bundle
So, there is way to disable this WARNING logs?

1 Like

Currently there is no way. I think perhaps we should remove the warning and do like this instead:

local data, err = sys.load_resource(filename)
if not data then
	print(err) -- Failed to load resource: filename (-3)
	return
end
print(data)
1 Like

We’re maybe going to look into this next sprint. Old ticket for this: DEF-1116

2 Likes

Up theme. Can it be solved in next release?

I’m afraid it’s been down prioritised due to other issues that we consider more important.

Double checking: This is only for not showing the warning in the console right? There is no other problem with sys.load_resource()?

Yea, it only console logging spam

Any news? Seems this issue is quick-win, but for now I have no way to escape console log spam

We (Alexey) will fix it this sprint. It will be according to my suggestion with a second return value containing the error message.

3 Likes

Solved in Defold 1.2.157 has been released

1 Like