as to this I think you do not write permission to the folder it trying to write to. normally for me it writes these files to mycroft-core and i use that as a slush folder
try this add this line to the bottom of online script found in the bash folder
pwd > $HOME/tmp.log
it will write the current write directory paths to a file stored in the home folder under the file name tmp.log then you can check if you have write permission to that folder
you can also check who the program username it is trying to write under just add this line under the above
whoami >> $HOME/tmp.log
if it writing as a user that not the current log in user or expected user . it will write the tmp.log to either its home directory and if that does not exist to root directory
Hi i know its been a while since you updated your skill and its really cool. i found some typeos in the github lines 431 i changed to :
fd = os.open(“tmp_recipe”, os.O_RDONLY)
filepath = os.fdopen(fd)
path = filepath.read()
that seems to work and lines 422,683,733,789 i fixed recipes for gui.sh
but i cant seem to get online working.
any hints.
thank you
Ingredients
⅓ cup butter
1 ¼ cups cranberries
½ cup chopped pecans
½ cup butter, room temperature
¾ cup white sugar
2 eggs
1 teaspoon vanilla extract
1 cup sour cream
1 ½ cups all-purpose flour
1 ½ teaspoons baking powder
1 teaspoon baking soda
½ teaspoon ground cinnamon
¼ teaspoon salt
Directions
a 9 inch springform pan with aluminum foil to prevent leaking. Sift
together the flour, baking powder, baking soda, cinnamon and salt.
Set aside.
2. In a saucepan over medium heat, combine brown sugar and 1/3 cup
butter. Bring to a boil, then pour into bottom of springform pan.
Sprinkle with cranberries and pecans.
3. In a large bowl, cream together the butter and 3/4 cup sugar until
light and fluffy. Beat in the eggs one at a time, then stir in the
vanilla. Beat in the flour mixture alternately with the sour cream.
Pour batter into prepared pan.
4. Bake in the preheated oven for 60 minutes, or until a toothpick
inserted into the center of the cake comes out clean. Cool in pan
for 10 minutes, then invert onto serving platter and carefully
remove pan. Serve warm.
my recipe skill still appears to be working fine I just grabbed this today with it … some times all recipe webpage page format changes slightly and you have to adjust it to process the change . you can test each script to see if it got broken somewhere . if the scripts work fine then it probably got broken somewhere with the newer python version that you are probably using
if you are wondering how I determines their search query format . just enter something in their search bar and press enter - the resulting url tells you how they changed the format . I see generally with all-recipe they change things up slightly every ~2 years. usually the changes are minimal as in the case of this search query format
one more thing they changed is the recipe thumbnail location
so you have to change process_recipe3 as well
lynx -dump $INPUT | grep "https://imagesvc.meredithcorp.io" | sed 's/https:\/\//\'$'\n/g' | sed '$!d' | sed -ne 's/.*/https:\/\/&/p' > PIC_URL # process picturelink
to
lynx -source $INPUT | grep 'og:image" content="https://www.allrecipes.com/thmb/' | sed 's/https:\/\//\'$'\n/g' | sed '$!d' | sed -ne 's/.*/https:\/\/&/p' | sed 's/[\"].*//' > PIC_URL # process picturelink
okay I found one more change but this has to do with a change in python itself - when it reads a line it added a new line character I had to add
PIC_OL = PIC_OL.strip()
to strip the new line character so it could process the image URL
I also updated github with the new changes… if other issue let me know as currently it working fine on my computer setup
its awesome that you replied. I will continue till this skill works right. now it looks like I have permissions issues. again if nobody has told your awesome today just let it be known. the skill has a lot of components I’m interested in and it would also be nice to have my security screen pop up what I’m cooking in the kitchen with voice command so its useful skill.
well thank you kindly for the praise- much appreciated . that an interesting addition to it…, probably have to make a “add today’s menu” section in init.py sort of loosely based on the “save recipe” . when you find a recipe you like just say add to menu ( possible subsection appetizer, main course …etc) and then a a display menu section
@krywenko thanks didn’t realise it was as easy as dropping the skill into the skills directory. It was detected and installed without me doing anything else.
I get some errors when I try to use it. This is mycroft core installed on Ubuntu 22.04 running in a terminal window - for example ‘lemon cake recipe’ the skills log shows …
2022-12-30 10:28:18.660 | INFO | 3183538 | msm.mycroft_skills_manager | Best match (1.0): all-recipe-skill by krywenko
2022-12-30 10:28:18.661 | ERROR | 3183538 | SkillInstallerSkill | MSM failed: AlreadyInstalled(all-recipe-skill)
/bin/sh: 1: skills/all-recipe-skill/./GUI.sh: Permission denied
sh: 1: skills/all-recipes-skill/bash/en-us/./online: not found
2022-12-30 10:30:10.900 | ERROR | 3183538 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:923 | An error occurred while processing a request in All Recipes
Traceback (most recent call last):
File “/home/patrick/mycroft-core/mycroft/skills/mycroft_skill/event_container.py”, line 73, in wrapper
handler(message)
File “/opt/mycroft/skills/all-recipe-skill/init.py”, line 434, in handle_online_getrecipe
filepath = open(“tmp_recipe”,“r”)
FileNotFoundError: [Errno 2] No such file or directory: ‘tmp_recipe’
/bin/sh: 1: skills/all-recipe-skill/./GUI.sh: Permission denied
sh: 1: skills/all-recipes-skill/bash/en-us/./online: not found
2022-12-30 10:30:37.786 | ERROR | 3183538 | mycroft.skills.mycroft_skill.mycroft_skill:on_error:923 | An error occurred while processing a request in All Recipes
Traceback (most recent call last):
File “/home/patrick/mycroft-core/mycroft/skills/mycroft_skill/event_container.py”, line 73, in wrapper
handler(message)
File “/opt/mycroft/skills/all-recipe-skill/init.py”, line 434, in handle_online_getrecipe
filepath = open(“tmp_recipe”,“r”)
FileNotFoundError: [Errno 2] No such file or directory: ‘tmp_recipe’