Closed srescio closed 7 months ago
worth mentioning that during skill setup I also was unable to import via GH link and had the same error as https://github.com/keatontaylor/alexa-actions/issues/230 my language is italian, which is supposedly supported so instead I downloaded the repo as zip and uploaded that, not sure this might have played a role or not
Same here. Tried to import via GitHub too, but results on error... Reading the logs, same error: "[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'isodate'". Btw, it happens in English (can't import via Github link) and also in Portuguese (BR).
worth mentioning that during skill setup I also was unable to import via GH link and had the same error as #230 my language is italian, which is supposedly supported so instead I downloaded the repo as zip and uploaded that, not sure this might have played a role or not
How did you upload it? I dont see that option
How did you upload it? I dont see that option
when it gives you the error about failing to provision resources ignore the error and go ahead with creating the skill, then go into the code editor having created "from scratch" and select the option to upload it, will overwrite the "hello world" files
https://github.com/keatontaylor/alexa-actions/assets/6099979/44edde67-f197-4e73-9b08-de029f7d6679
How did you upload it? I dont see that option
when it gives you the error about failing to provision resources ignore the error and go ahead with creating the skill, then go into the code editor having created "from scratch" and select the option to upload it, will overwrite the "hello world" files
Registrazione.schermo.2024-02-15.alle.23.06.00.mp4
Thanks, sadly this doesn't solve the error by the looks of things, the tests are still failing.
Guys is this is unrelated to the original issue. Please move to a discussion chat created https://github.com/keatontaylor/alexa-actions/discussions/232.
@Krispkiwi @srescio
worth mentioning that during skill setup I also was unable to import via GH link and had the same error as #230 my language is italian, which is supposedly supported so instead I downloaded the repo as zip and uploaded that, not sure this might have played a role or not
There are 2 issues here guys. So first there is languages not being supported currently like Indian. The second one is with importing because of library that is not installing.
I suspect I know whats the issue, let me confirm if its the issue indeed
worth mentioning that during skill setup I also was unable to import via GH link and had the same error as #230 my language is italian, which is supposedly supported so instead I downloaded the repo as zip and uploaded that, not sure this might have played a role or not
There are 2 issues here guys. So first there is languages not being supported currently like Indian. The second one is with importing because of library that is not installing.
I suspect I know whats the issue, let me confirm if its the issue indeed
I dont know anything about AWS (first day) but I see the logs point to missing dependencies. Is AWS not supposed to import the packages on build?
2024-02-21T01:31:51.224+01:00 [ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'isodate' Traceback (most recent call last):
The third-party imports are failing
Ok so got some news. The issue seems to be with isodate library specifically. My guess is that AWS is not compiling isodate properly in the backend. The solution will be so remove isodate and make my own iso to seconds converter. Hot fix will come soon
Ok so fix is done. Please try the code in the branch associated with this Issue and let me know if it works or not for you guys. Hope to get some feedback before merging into master
@DEADSEC-SECURITY tested now, good news is the isodate error is gone 👍🏻 bad news is, now it complains about something else 😅
[ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'sentry_sdk'
Traceback (most recent call last):
the libs imports are not working, doesnt matter how you place the lambda code into the skill, it definitely throws on that as its directly referenced I tried looking for instances of the others libraries mentioned in requirements.txt like the boto3 but it doesn't seem to be ever imported anywhere? but maybe it has to be present implicitly for some aws blackbox magic am not aware of
This is because aws bosted from python 3.7 to 3.8. It must've messed with the environments for python3.
I dont seems to have the option to downgrade or select a different python version upon skill creation, wish they put some migration guide or something but cant find anything by sheer googling, one would hope they d respect the version specified in the toml file but that doesn't seem the case...
I'm trying to weigh my options because there are solutions but those same solutions are too complicated for non-developers and will make it way harder to use
I was able to make it work, but I had to, in my case, Export do VSCode. It creates a local git with the code on your machine.
Then, using pip, I've installed dependencies manually and push back the code with libraries.
pip install -t . isodate==0.6.1 pydantic==1.10.4 sentry-sdk==1.32.0
After that, I have all necessary libraries in place and I can do the Hello World testing of the skill.
That's one workaround but not ideal.
Also if any lib is compiled it wont work @vfranchi because compiling in windows wont work in lambda which runs linux. Thats one of the reasons Im trying to avoid that
Maybe this could work. I created a ZIP file of my lambda folder, with everything needed to run the code. Amazon has a limit of 100 files per Import from a Zip file, so I had to do the import in parts. I replicated these steps and the Skill worked sucessfully:
integrations
folder from sentry_sdk
packageintegrations
folder from sentry_sdk
package@DEADSEC-SECURITY If you want I can provide you with this ZIP file, or if you prefer I'm sure you can create one yourself. I think this is a good approach for non-developers as well. It'll require just a manual import of the code.
For now if anyone wants to replicate @vfranchi go ahead. I will keep this issue open until we come up with something more permanent. We have a guy contacting AWS, I might do the same and I'm keeping on researching it too.
@vfranchi feel free to add the zip file to this issue for people hwo want to implement the current workaround
@vfranchi and @DEADSEC-SECURITY thanks for keep in touch with the problem. if possible to have vfrachi's zip i'd like to test if it works.
same
Start from Scratch
integrations
folder from sentry_sdk
package
integrations
folder from sentry_sdk
package
You will need to update your Invocation Skill Name and use the JSON Editor to update the Skill intents https://github.com/keatontaylor/alexa-actions/blob/master/skill-package/interactionModels/custom/en-US.json
Testing result: When I say yes or no it now states "You just triggered hello world intent" and home assistant doesn't pick up any event
@vfranchi it worked 🚀
That part works but when you try to do yes or no responses testing the functionality, it doesn't.
Testing result: When I say yes or no it now states "You just triggered hello world intent" and home assistant doesn't pick up any event
Did you click the Deploy button on the Code page?
Testing result: When I say yes or no it now states "You just triggered hello world intent" and home assistant doesn't pick up any event
Did you click the Deploy button on the Code page?
Yes
Shouldn't be related to this issue anymore. All libraries are there and the code that makes it work is there as well. You are not seeing the No module named...
error anymore.
I can do the Yes or No testing here. It's done entirely on Home Assistant panel:
I'll go over the steps I did. Name: Alexa actionable notifications - English Local Custom - Alexa hosted python - US West Start from scratch - Create Skill Whilst that's creating the hosted skill I added the alexa_actionable_notification helper. Changed the skill invocation name to actionable notifications Imported the code except for the integrations folder then imported just the integrations folder then clicked deploy.
Testing "Open actionable notifications" I get there was a problem with the requested skills response I update the lamba to include my url and token and click deploy Testing again It picks up the input text but when I reply to it this happens
Maybe you've missed the JSON Editor part. Under Build, Interaction Model, JSON Editor. Paste the content of this file there. Hit Save on the top and Build.
Then proceed with the testing guide.
Maybe you've missed the JSON Editor part. Under Build, Interaction Model, JSON Editor. Paste the content of this file there. Hit Save on the top and Build.
Then proceed with the testing guide.
That was it, cheers.
i confirm it works, thanks to all.
Hey guys I just got confirmation that this is the way to go from now on so I will be updating the documentation very soon to reflect the new requirements.
I figured. Might as well compile the zip files using github actions when a new release is made so you guys can just download the zip files. It should make it a bit easier for noobies
This is now partially fixed guys. Now we have a github action to build the zip file for your so in every release we just have to download the compiled zip file for linux. https://github.com/keatontaylor/alexa-actions/releases/tag/v0.12.0
It will be under the name AlexaActionsLinux.zip.
Now last step will be to update the wiki to reflect these changes. If anyone would like to test this new version please feel free to do so and give me some feedback.
Wiki updated
Did you check our FAQ and Issue/PR for similar issues?
Contact Details
simone.rescio@gmail.com
What happened?
Followed all prerequisite and configs steps, Dev skill is linked and visible by echo, Upon invocation it should reply with the JSON payload stored in my homeassistant input_text helper instead it still complains of the skills response, cloudwatch logs contain runtime errors about imports not found
Version
0.9.1
What Alexa device are you using?
Echo
What other Alexa device are you using?
No response
Relevant log output