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

"ERROR failed to type check script" doesn't provide any context #128

Closed
lslunis opened this issue Sep 29, 2020 · 3 comments
Closed

"ERROR failed to type check script" doesn't provide any context #128

lslunis opened this issue Sep 29, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@lslunis
Copy link

lslunis commented Sep 29, 2020

I just got this error with no indication of the cause (my guess is that it's due to me trying to return a list from a capture). It'd be nice if it mentioned the name of the capture or action that was broken:

2020-09-29 14:59:03 ERROR failed to type check script
   42:            <stdlib>/threading.py:890|
   41:            <stdlib>/threading.py:926|
   40:            <stdlib>/threading.py:870|
   39:                    talon\cron.py:112|
   38: ------------------------------------# cron thread
   37:                    talon\cron.py:77 |
   36:          talon\scripting\rctx.py:200|
   35: ------------------------------------# 'cron' main:<lambda>()
   34:                     talon\vad.py:16 |
   33:             talon\engines\w2l.py:742|
   32:      talon\scripting\dispatch.py:98 |
   31:      talon\scripting\dispatch.py:133|
   30:      talon\scripting\dispatch.py:124|
   29:          talon\scripting\rctx.py:200|
   28: ------------------------------------# 'phrase' user.engines:_redispatch()
   27: talon\scripting\speech_system.py:42 |
   26:      talon\scripting\dispatch.py:98 |
   25:      talon\scripting\dispatch.py:133|
   24:      talon\scripting\dispatch.py:124|
   23:          talon\scripting\rctx.py:200|
   22: ------------------------------------# 'phrase' user.engines:engine_event()
   21: talon\scripting\speech_system.py:305|
   20:       talon\scripting\actions.py:56 |
   19:         talon\scripting\types.py:313|
   18:          talon\scripting\core.py:84 |
   17:       talon\scripting\actions.py:56 |
   16:         talon\scripting\types.py:313|
   15:          talon\scripting\core.py:106|
   14:       talon\scripting\actions.py:56 |
   13:         talon\scripting\types.py:313|
   12:          talon\scripting\core.py:121|
   11:       talon\scripting\actions.py:56 |
   10:         talon\scripting\types.py:313|
    9:          talon\scripting\core.py:142|
    8:  talon\scripting\talon_script.py:513|
    7: ------------------------------------# stack splice
    6:  talon\scripting\talon_script.py:511|
    5:  talon\scripting\talon_script.py:487|
    4:  talon\scripting\talon_script.py:219|
    3:  talon\scripting\talon_script.py:475|
    2:    talon\scripting\type_check.py:176|
    1:    talon\scripting\type_check.py:49 |
TypeError: unhashable type: 'list'
@lunixbochs
Copy link

lunixbochs commented Sep 29, 2020

Can you post your capture source here? Is it by any chance def fn() -> []:?

@lslunis
Copy link
Author

lslunis commented Sep 29, 2020

As discussed in #beta, it was def fn() -> [(int, str)]:, so that explains it. It'd be nice if the fn name was surfaced in the error message, but this seems pretty minor.

@lunixbochs
Copy link

this should be fixed in the current beta

@lunixbochs lunixbochs added the bug Something isn't working label Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants