Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #104 - Padatious intent and tracker list #112

Merged
merged 1 commit into from
Dec 22, 2022

Conversation

Tony763
Copy link

@Tony763 Tony763 commented Oct 23, 2022

Description

PR contain workaround fixing #104 proposed by @zeronounours.
Proper fix (new functions) is awaiting approve/merge of PR #3101.

As we want to update HA skill in Marketplace, it's better to use this workaround as proper fix can be incorporated later when PR is merged and new Mycroft Core is released.

Credit goes to @zeronounours. Thanks mate.

Fixes #64

Type of PR

  • Bugfix
  • Feature implementation
  • Refactor of code (without functional changes)
  • Documentation improvements
  • Test improvements

@Tony763 Tony763 changed the title Fix issue #104 Fix issue #104 - Padatious intent and tracker list Oct 23, 2022
@Tony763
Copy link
Author

Tony763 commented Oct 24, 2022

Reported as working by @robertsawko here

@stratus-ss
Copy link
Collaborator

@Tony763 how do we test this?

@Tony763
Copy link
Author

Tony763 commented Dec 9, 2022

Sadly, VK test did not catch this, as intent worked for it. Only hint about something be wrong was wrote into log and I missed it:

Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/opt/mycroft-core/.venv/lib/python3.7/site-packages/padatious/training_manager.py", line 29, in _train_and_save
obj.save(cache)
File "/opt/mycroft-core/.venv/lib/python3.7/site-packages/padatious/entity.py", line 43, in save
SimpleIntent.save(self, prefix)
File "/opt/mycroft-core/.venv/lib/python3.7/site-packages/padatious/simple_intent.py", line 129, in save
self.ids.save(prefix)
File "/opt/mycroft-core/.venv/lib/python3.7/site-packages/padatious/id_manager.py", line 48, in save
with open(prefix + '.ids', 'w') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/.local/share/mycroft/intent_cache/homeassistant.mycroftai:{/tmp/mycroft/cache/HomeAssistantSkill/tracker}.intent.ids'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/opt/mycroft-core/.venv/lib/python3.7/site-packages/padatious/training_manager.py", line 100, in train
pool.map_async(train, self.objects_to_train).get(timeout)
File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/multiprocessing/pool.py", line 657, in get
raise self._value
FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/.local/share/mycroft/intent_cache/homeassistant.mycroftai:{/tmp/mycroft/cache/HomeAssistantSkill/tracker}.intent.ids'
FANN Error 2: Unable to open configuration file "/home/runner/.local/share/mycroft/intent_cache/homeassistant.mycroftai:{/tmp/mycroft/cache/HomeAssistantSkill/tracker}.intent.net" for writing.

@Tony763
Copy link
Author

Tony763 commented Dec 9, 2022

VK tests can be seen there: https://mycroftai.github.io/skill-homeassistant/70/

@Tony763
Copy link
Author

Tony763 commented Dec 9, 2022

I will rebase this with latest merged commits, so CI can check this, tonight.

@Tony763
Copy link
Author

Tony763 commented Dec 20, 2022

@stratus-ss or @krisgesling Could You add “Secure” label? I just rebased this PR to contain latest changes from 20.08 branch (CI should now work).

@Tony763
Copy link
Author

Tony763 commented Dec 20, 2022

Rebased, CI run in my repo was successful.

@krisgesling krisgesling added the secure Code has been reviewed and is safe to execute in Github Actions. label Dec 20, 2022
@github-actions github-actions bot removed the secure Code has been reviewed and is safe to execute in Github Actions. label Dec 20, 2022
@Tony763
Copy link
Author

Tony763 commented Dec 20, 2022

Allure tests Ok, skill log OK, ready to go 🚀

@Tony763 Tony763 mentioned this pull request Dec 20, 2022
5 tasks
@krisgesling krisgesling merged commit 19c1b01 into MycroftAI:20.08 Dec 22, 2022
@Tony763 Tony763 deleted the feature/issue104a branch December 22, 2022 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intent conflicts for what and where
3 participants