It is currently April 25th, 2024, 3:30 pm

Unable to read resource files

Get help with creating, editing & fixing problems with skins
Honeysprings
Posts: 5
Joined: October 13th, 2022, 2:26 pm

Unable to read resource files

Post by Honeysprings »

Howdy!

I'm following the basic weather rainmeter tutorial and have extracted the '@includefiles' package into my resources folder for the skin and set up the code to 'import' the variables.
When I load the skin and check the log to ensure the measures are working properly, the log says that it was unable to read the files.

Does anyone know what may be causing this?

Thanks,

Honeysprings
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Unable to read resource files

Post by SilverAzide »

Honeysprings wrote: October 13th, 2022, 10:08 pm Howdy!

I'm following the basic weather rainmeter tutorial and have extracted the '@includefiles' package into my resources folder for the skin and set up the code to 'import' the variables.
When I load the skin and check the log to ensure the measures are working properly, the log says that it was unable to read the files.

Does anyone know what may be causing this?

Thanks,

Honeysprings
Please post your skin here (just the main one, not the include templates). No one will be able to help without it.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16169
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Unable to read resource files

Post by balala »

Honeysprings wrote: October 13th, 2022, 10:08 pm I'm following the basic weather rainmeter tutorial and have extracted the '@includefiles' package into my resources folder for the skin and set up the code to 'import' the variables.
When I load the skin and check the log to ensure the measures are working properly, the log says that it was unable to read the files.
If you extracted anything somewhere (not sure where to be honest), did you add the proper @Include option to your code? If it's not added, you're waiting in vain the skin to use the measures.
As SilverAzide says, you should post a skin here, but I think you should have to pack the whole config as you have it and upload the package here.
Honeysprings
Posts: 5
Joined: October 13th, 2022, 2:26 pm

Re: Unable to read resource files

Post by Honeysprings »

balala wrote: October 14th, 2022, 12:12 pm If you extracted anything somewhere (not sure where to be honest), did you add the proper @Include option to your code? If it's not added, you're waiting in vain the skin to use the measures.
As SilverAzide says, you should post a skin here, but I think you should have to pack the whole config as you have it and upload the package here.
I hope it works!
MyFirstSkin2.zip
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2605
Joined: March 23rd, 2015, 5:26 pm

Re: Unable to read resource files

Post by SilverAzide »

Honeysprings wrote: October 13th, 2022, 10:08 pm Howdy!

I'm following the basic weather rainmeter tutorial and have extracted the '@includefiles' package into my resources folder for the skin and set up the code to 'import' the variables.
When I load the skin and check the log to ensure the measures are working properly, the log says that it was unable to read the files.

Does anyone know what may be causing this?
The reason your skin is not working is that the path to the template "include files" isn't correct. Remember that "#@#" is a special variable that points to the "@Resources" folder. So, your code says...

Code: Select all

@includeVariables=#@#WeatherComJSONVariables.inc
...etc.
...but that is not where you put this file. You placed all the template files in a subfolder named "@IncludeFiles", so what you need for this to work is:

Code: Select all

@includeVariables=#@#@IncludeFiles\WeatherComJSONVariables.inc
...etc.
I suggest you simply move all the files up one level into the @Resources folder instead of nesting them so deeply, but it is entirely your call, it makes no real difference as long as the code references the proper file location.

Now, your skin has other issues, the least of which is that you have no meters that will display anything. "Measures" return a value (like a measurement or some piece of data read from somewhere), "Meters" show a value or some text (or both). I would suggest (just my preference) you group all your measures together at the top part of the file, and group the meters after them. (All those include templates mostly contain dozens and dozens of measures.) There is a text file provided with the templates that describes what all the measures do.

Obviously you copied some code from some other skin, but if you want to see something happen, then add the following meter after your [MeasureAfternoon] measure:

Code: Select all

[meterConditions]
Meter=String
MeasureName=@CurrentTemperature
MeasureName2=@UnitsTemperature
AntiAlias=1
DynamicVariables=1
FontColor=255,255,255
FontFace=Segoe UI
FontSize=40
SolidColor=0,0,0,1
Text="%1°%2"
Your [MeasureAfternoon] measure makes reference to this meter to set a tooltip. So if you hover your mouse over the temperature, you'll see it. Note there will be a brief delay between when your skin loads and when the data shows up; this delay happens while the weather info is being fetched from the weather.com site.
Gadgets Wiki GitHub More Gadgets...
Honeysprings
Posts: 5
Joined: October 13th, 2022, 2:26 pm

Re: Unable to read resource files

Post by Honeysprings »

SilverAzide wrote: October 14th, 2022, 11:44 pm The reason your skin is not working is that the path to the template "include files" isn't correct. Remember that "#@#" is a special variable that points to the "@Resources" folder. So, your code says...

Code: Select all

@includeVariables=#@#WeatherComJSONVariables.inc
...etc.
...but that is not where you put this file. You placed all the template files in a subfolder named "@IncludeFiles", so what you need for this to work is:

Code: Select all

@includeVariables=#@#@IncludeFiles\WeatherComJSONVariables.inc
...etc.
I suggest you simply move all the files up one level into the @Resources folder instead of nesting them so deeply, but it is entirely your call, it makes no real difference as long as the code references the proper file location.

Now, your skin has other issues, the least of which is that you have no meters that will display anything. "Measures" return a value (like a measurement or some piece of data read from somewhere), "Meters" show a value or some text (or both). I would suggest (just my preference) you group all your measures together at the top part of the file, and group the meters after them. (All those include templates mostly contain dozens and dozens of measures.) There is a text file provided with the templates that describes what all the measures do.

Obviously you copied some code from some other skin, but if you want to see something happen, then add the following meter after your [MeasureAfternoon] measure:

Code: Select all

[meterConditions]
Meter=String
MeasureName=@CurrentTemperature
MeasureName2=@UnitsTemperature
AntiAlias=1
DynamicVariables=1
FontColor=255,255,255
FontFace=Segoe UI
FontSize=40
SolidColor=0,0,0,1
Text="%1°%2"
Your [MeasureAfternoon] measure makes reference to this meter to set a tooltip. So if you hover your mouse over the temperature, you'll see it. Note there will be a brief delay between when your skin loads and when the data shows up; this delay happens while the weather info is being fetched from the weather.com site.
Thank you so much!