Coder Social home page Coder Social logo

Comments (10)

krisgesling avatar krisgesling commented on July 18, 2024

Hi there, I've posted in the German Chat Channel to see if others are seeing the same thing.

from mycroft-timer.

gras64 avatar gras64 commented on July 18, 2024

you got en error like this ?
File "/home/andreas/mycroft-core/mycroft/skills/mycroft_skill/event_container.py", line 66, in wrapper handler(message) File "/opt/mycroft/skills/mycroft-timer.mycroftai/__init__.py", line 662, in handle_start_timer_padatious self.handle_start_timer(message) File "/opt/mycroft/skills/mycroft-timer.mycroftai/__init__.py", line 577, in handle_start_timer secs, utt_remaining = self._extract_duration(utt) File "/opt/mycroft/skills/mycroft-timer.mycroftai/__init__.py", line 133, in _extract_duration duration, str_remainder = extract_duration(utt, self.lang) TypeError: 'NoneType' object is not iterable

from mycroft-timer.

SXXXR avatar SXXXR commented on July 18, 2024

I remember I got it once in the beginning,
so this is a known thing?

from mycroft-timer.

gras64 avatar gras64 commented on July 18, 2024

this is due to linguia franca. I think that should be fundamentally revised and updated. I'm too unqualified for that. post it under linqua franca. the function extract_duration, _convert_words_to_numbers_de, _extract_numbers_with_text_de..... are not available

from mycroft-timer.

emphasize avatar emphasize commented on July 18, 2024

I'm at it. The structure is a bit messy, so i try to restructure the german lingua franca to fit in. But don't expect too much, i solely tackle the issues described. (extract_duration, _convert_words_to_numbers_de, _extract_numbers_with_text_de)

It doesn't seem to be that complicated (the regex pattern being the major issue besides the missing functions), but we'll see. I may run into problems since the LF is more narrowed down (maybe a positive) than other languages while some parts are fundamently different.

from mycroft-timer.

emphasize avatar emphasize commented on July 18, 2024

That said, i think it would be beneficial if we had something like "skill-alarm" in place that prevents such outcome - if someone typed uninterpretable stuff

#
if (when is None or when.time() == today.time()) and not is_midnight:
in case a query is fired which asks for compatible timeframe

On the other hand, i don't expect the skills' lifespan to be that long lasting because it overlaps too much with skill-alarm (maybe i'm missing something)

from mycroft-timer.

krisgesling avatar krisgesling commented on July 18, 2024

I think we'll always have both the Timer and Alarm Skills. Even though they are both Skills that emit a sound at a given point in time, they are conceptually different. A timer counts down and you may want to know how much time as elapsed and how long left until it's finished etc. An alarm is a way to make a sound at some specific point in time and may be recurring - eg every weekday morning at 8am, but until that time you usually don't care about it or want to interact with it.

Definitely makes sense to catch this and handle it appropriately (as well as fixing the cause in LF)

from mycroft-timer.

emphasize avatar emphasize commented on July 18, 2024

Brought it to life. But several things have to be adressed in mycroft-core in regard of duration handling to "fully" embrace lingua franca

  • mycrofts parser (#) (extract_duration) has to be pointed to lingua franca

  • the formatters' duration handling (#) (most likely) stands in the way to format durations lingua franca style. I got the very german eins, eine, einer problem that should be tackled by format_de.py (resp. format_en)

If this is not already issued. i'll start one over there. (will be adressed with PR#108)

Edit: I thought more of merging the two.

from mycroft-timer.

forslund avatar forslund commented on July 18, 2024

The first of the points has been resolved.

The second I'm not quite sure, it's newer than the nice duration in LF. We'll see after the big LF refactor if those changes should be merged over to LF so core can stop handling it.

from mycroft-timer.

ChanceNCounter avatar ChanceNCounter commented on July 18, 2024

The big LF refactor would raise an exception here, too, just a more explicit one ("function... has not been localized to language 'de'.") mycroft-core #2703 might bridge the gap, by allowing skills to force a language in which they've been tested.

Unless another language is specified in function calls, the new LF will always call the user's "default" language, the only difference in that respect being that it used to call English. In this case, the default language would still be 'de-de', and you'd still get FunctionNotLocalizedError.

I don't think it'll be hard to write a layer that handles those cases, but it's above LF's paygrade as it concerns user config and skills. I think it should probably be part of the linked issue.

from mycroft-timer.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.