Skill not loaded by skill_loader

Hi,

I am back to Mycroft after more than one year occupied to move in a new home.
The Mark II RPi is my future project.
Right now I install Picroft on a new Pi4 and it works fine.
I had built skills at the end of 2018 and I want to try some.

The purpose of the first one is to get information from an IoT I am using at home : GitHub - henridbr/henridbr-netatmo-weather: A Mycroft Skill for Home Temperatures and more with Netatmo.

I install it and verify it’s on the skills list using msm.

Then I need to configure it using interface page on Account but unfortunately, the skill is not in the list.

On the skills.log, an error occurred when the script is asking for a token sent by the IoT Netatmo when it’s interrogated. And to get it, the skill needs to be configurated before …

2020-05-21 21:31:02.564 | INFO | 702 | SkillInstallerSkill | Installing from the web…
2020-05-21 21:31:03.141 | INFO | 702 | msm.skill_entry | Downloading skill: GitHub - henridbr/henridbr-netatmo-weather: A Mycroft Skill for Home Temperatures and more with Netatmo.
2020-05-21 21:31:04.505 | INFO | 702 | msm.skill_entry | Installing system requirements…
2020-05-21 21:31:04.626 | INFO | 702 | msm.skill_entry | Successfully installed henridbr-netatmo-weather
2020-05-21 21:31:04.627 | INFO | 702 | msm.mycroft_skills_manager | invalidating skills cache
2020-05-21 21:31:04.633 | INFO | 702 | SkillInstallerSkill | to_install:
2020-05-21 21:31:04.633 | INFO | 702 | SkillInstallerSkill |
2020-05-21 21:31:04.634 | INFO | 702 | SkillInstallerSkill | to_install:
2020-05-21 21:31:05.083 | INFO | 702 | msm.mycroft_skills_manager | building SkillEntry objects for all skills
2020-05-21 21:31:05.343 | INFO | 702 | mycroft.skills.skill_loader:load:114 | ATTEMPTING TO LOAD SKILL: henridbr-netatmo-weather.henridbr
2020-05-21 21:31:05.358 | INFO | 702 | mycroft.skills.settings:get_local_settings:78 | /opt/mycroft/skills/henridbr-netatmo-weather.henridbr/settings.json
400 {“error”:“invalid_client”}
2020-05-21 21:31:05.564 | ERROR | 702 | mycroft.skills.skill_loader:_create_skill_instance:231 | Skill init failed with AttributeError(“‘NetatmoWeatherSkill’ object has no a
ttribute ‘access_token’”)
Traceback (most recent call last):
File “/home/pi/mycroft-core/mycroft/skills/skill_loader.py”, line 228, in _create_skill_instance
self.instance = skill_module.create_skill()
File “/opt/mycroft/skills/henridbr-netatmo-weather.henridbr/init.py”, line 117, in create_skill
return NetatmoWeatherSkill()
File “/opt/mycroft/skills/henridbr-netatmo-weather.henridbr/init.py”, line 54, in init
‘access_token’: self.access_token,
AttributeError: ‘NetatmoWeatherSkill’ object has no attribute ‘access_token’
2020-05-21 21:31:05.566 | ERROR | 702 | mycroft.skills.skill_loader:_communicate_load_status:286 | Skill henridbr-netatmo-weather.henridbr failed to load

I don’t know what to do.
The last time it worked it was under the Core-version 19.2.1 !

I am not certain but is it possible that this line in your code…

response = requests.post("https://api.netatmo.com/oauth2/token", data=payload)

Is not returning the proper json object? Maybe the api has changed?

response.json()["access_token"]

Thank you pcwii

I have an Arduino which is using the same api and it is running well.
I didn’t practice Python for a while so I am always a beginner !
I have a problem with an other skill written during the same time.
This other skill appears in the skills list on https://home.mycroft.ai/skills but I receive an error when calling it.
It was due to the method I used to look after the files path.
I change it and now it works.

It’s probably something not really correctly written but which was accepted by Python on an older version.

I think that the error which occurs is something like that.

I do some progress but I am going from one error to one another.

File “/opt/mycroft/skills/henridbr-netatmo-weather.henridbr/ init .py”, line 54, in init
‘access_token’: self.access_token,
AttributeError: ‘NetatmoWeatherSkill’ object has no attribute ‘access_token’

This error disappears when I add above

self.access_token = ‘’

Then the same error type occurs with the line 55 and I apply the same correction

Now the skill setting page shows this skill and I can fill in the form with the parameters.

But I get a new one line 77 : string indices must be integer …

File “/opt/mycroft/skills/henridbr-netatmo-weather.henridbr/init.py”, line 77, in handle_netatmo_intent
sta_name = self.data[‘devices’][0][‘station_name’]
TypeError: string indices must be integers