Release - Amazon Echo skill for Kodi

  Thread Rating:
  • 9 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bill_orange Offline
Senior Member
Posts: 170
Joined: Nov 2015
Reputation: 0
Post: #1441
I have not been able to run the upgrade procedure successfully. I am working in Windows 10. I can start the virtual environment okay.

When I try to run , pip install -r requirements.txt, I get a screen full of 'Requirements already satisfied messages'. I assume that for this upgrade that is normal.

When I try to run 'git pull origin master' or 'git pull https://github.com/m0ngr31/kodi-alexa.git' I get the error:


(venv) C:\Python27>git pull origin master https://github.com/m0ngr31/kodi-alexa.
git
fatal: Not a git repository (or any of the parent directories): .git

or


(venv) C:\Python27\kodi-alexa>git pull origin master https://github.com/m0ngr31/
kodi-alexa.git
fatal: Not a git repository (or any of the parent directories): .git

Is this the wrong syntax for window 10 perhaps? I have not a clue, but I sure don't want to overwrite my .env file. I assume that is the purpose of using git pull origin master vs. git clone.

I tried renaming my folder kodi-alexa, kodi-alexa-master, didn't help.
(This post was last modified: 2017-05-23 20:16 by bill_orange.)
find quote
Twit Offline
Junior Member
Posts: 3
Joined: May 2014
Reputation: 0
Post: #1442
Yo @bill_orange - It's "git clone" NOT "git pull". I know because I did the same thisSmile.

Help File

Cheers

Si
find quote
bill_orange Offline
Senior Member
Posts: 170
Joined: Nov 2015
Reputation: 0
Post: #1443
Twit, were you installing or upgrading? The upgrade instructions are pretty clear on using git pull. I don't want to accidently trach my .env file.

Also, is you working folder named kodi-alexa or kodi-alexa-master? That may matter. Did you run the git command in the c:\python27\kodi-alexa folder or in the C:\python27 folder?

I tried running git init and git status and got this:


(venv) C:\Python27\kodi-alexa-master>git status
On branch master

Initial commit

Untracked files:
(use "git add <file>..." to include in what will be committed)

.env.example
.gitignore
CHANGELOG.txt
CONTRIBUTING.md
CONTRIBUTORS.md
ISO-639-2_utf-8.txt
LICENSE
Procfile
README.md
UPGRADING.md
alexa.py
alexa.wsgi
app.json
generate_custom_slots.py
kodi.py
kodi_108x108.png
kodi_512x512.png
requirements.txt
speech_assets/
templates.de.yaml
templates.en.yaml
utterances.german.txt
utterances.txt
zappa.txt

nothing added to commit but untracked files present (use "git add" to track)

Looks good to me??

Now I get:

(venv) C:\Python27\kodi-alexa-master>git pull origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

So still no joy.
(This post was last modified: 2017-05-24 00:17 by bill_orange.)
find quote
vladchiriloiu Offline
Junior Member
Posts: 4
Joined: May 2017
Reputation: 0
Post: #1444
Hi @jingai - it seems to have worked. Dunno what changed, but it worked and now the skill is active and working again.

Thank you for your time and help.
find quote
blaher Offline
Junior Member
Posts: 16
Joined: Oct 2010
Reputation: 0
Post: #1445
(2017-04-19 16:19)m0ngr31 Wrote:  I was just notified that the HowToGeek article was updated this morning, so maybe it'll be easier to follow if you start over?

This is good advice for anyone trying to do get this working on Windows:
https://www.howtogeek.com/249336/how-to-...azon-echo/

I'll list the bits I found confusing in the README.md, as a Windows user, in the hope it helps others, or help to update the instructions.

"Unless you are going to host the skill on Heroku, there are a few things in the instructions that you will need to install before you can get started:

Python 2.7 (Python 3 will not work)
Git"

I hosted on Heroku, but if you don't install Python, (and apparently it has to be at least 2.7.9, because pip wasn't found when I tried 2.7.0), then where are you going to enter this:
"Next, run these commands to configure your computer for AWS service access: pip install awscli"?

I tried to enter the commands on a GIT command window, as a guess, because it didn't say where, but when I got to the next bit, I got stuck:

"Before you deploy, you need to create the file kodi.config", that's OK, but where do I put it when it's created? Nowhere does it say to download the repository and put it on your local drive, or is there another method?

"On the next page, you'll have to paste the contents of the IntentSchema.json file into the "Intent Schema" field, and paste the contents of the SampleUtterances.txt file in the "Sample Utterances" field. " These files are located in the https://github.com/m0ngr31/kodi-alexa/tr...ech_assets directory would be a helpful addition, or something similar for idiots like me.

Also, the slot generator web page gives me a "Please validate your server information and try again" error, but the python version works.

"You can also get the information from running python generate_custom_slots.py in the project directory." Once again you need to have Python, even if using Heroku, by the looks.

Thanks for all the work on this. It really is awesome to be able to do so much in Kodi with just your voice. Smile
find quote
jingai Offline
Skilled Skinner
Posts: 2,103
Joined: Mar 2010
Reputation: 36
Post: #1446
(2017-05-24 07:11)blaher Wrote:  I hosted on Heroku, but if you don't install Python, (and apparently it has to be at least 2.7.9, because pip wasn't found when I tried 2.7.0), then where are you going to enter this:
"Next, run these commands to configure your computer for AWS service access: pip install awscli"?

If you're hosting with Heroku, skip the Lambda section.. the README tells you this ("skip to the Skill Setup section").

(2017-05-24 07:11)blaher Wrote:  I tried to enter the commands on a GIT command window, as a guess, because it didn't say where, but when I got to the next bit, I got stuck:

"Before you deploy, you need to create the file kodi.config", that's OK, but where do I put it when it's created? Nowhere does it say to download the repository and put it on your local drive, or is there another method?

Why are you following the instructions for AWS if you're trying to host on Heroku...? You're in the wrong section entirely. For Heroku, you push the Heroku button and then skip down to the skill setup section, as the README states.

(2017-05-24 07:11)blaher Wrote:  "On the next page, you'll have to paste the contents of the IntentSchema.json file into the "Intent Schema" field, and paste the contents of the SampleUtterances.txt file in the "Sample Utterances" field. " These files are located in the https://github.com/m0ngr31/kodi-alexa/tr...ech_assets directory would be a helpful addition, or something similar for idiots like me.

Open an Issue on Github please stating that you'd like to see links to these files added to the README.

(2017-05-24 07:11)blaher Wrote:  Also, the slot generator web page gives me a "Please validate your server information and try again" error, but the python version works.

Are you sure you entered everything correctly?

(2017-05-24 07:11)blaher Wrote:  "You can also get the information from running python generate_custom_slots.py in the project directory." Once again you need to have Python, even if using Heroku, by the looks.

Because we expect the Heroku users to use the web slot generator.
find quote
jingai Offline
Skilled Skinner
Posts: 2,103
Joined: Mar 2010
Reputation: 36
Post: #1447
@bill_orange, it looks like you initially downloaded the ZIP file rather than using "git clone" to create your local copy. If you do this, you won't use "git pull" to update the code -- you'd download the new ZIP release instead.

The UPGRADING instructions tell you to use "git pull" because the README instructs people to use "git clone" to initially create it. If you choose to do it some other way, you'll need to account for that.
find quote
bill_orange Offline
Senior Member
Posts: 170
Joined: Nov 2015
Reputation: 0
Post: #1448
As usual you are correct. I now recall that I only put git on my machine after I successfully got Kodi-Alexa going.

I am still stuck.

I downloaded the zip file and replaced all the changed files in my working folder. I activated the virtual environment, ran requirements and discovered that for some reason I had to reinstall zappa. Okay zappa reinstalled. With my heart filled with hope, I ran 'zappa update dev' Here's what I got:



(venv) C:\Python27\kodi-alexa>zappa update dev
Calling update for stage dev..
Oh no! An error occurred! Sad

==============

Traceback (most recent call last):
File "c:\python27\lib\site-packages\zappa\cli.py", line 2353, in handle
sys.exit(cli.handle())
File "c:\python27\lib\site-packages\zappa\cli.py", line 456, in handle
self.dispatch_command(self.command, stage)
File "c:\python27\lib\site-packages\zappa\cli.py", line 500, in dispatch_comma
nd
self.update()
File "c:\python27\lib\site-packages\zappa\cli.py", line 794, in update
self.create_package()
File "c:\python27\lib\site-packages\zappa\cli.py", line 1945, in create_packag
e
output=output
File "c:\python27\lib\site-packages\zappa\core.py", line 462, in create_lambda
_zip
copytree(site_packages, temp_package_path, symlinks=False, ignore=shutil.ign
ore_patterns(*excludes))
File "c:\python27\lib\site-packages\zappa\utilities.py", line 32, in copytree
shutil.copystat(src, dst)
File "c:\python27\lib\shutil.py", line 95, in copystat
st = os.stat(src)
WindowsError: [Error 3] The system cannot find the path specified: 'C:\\Python27
\\kodi-alexa-master\\venv\\Lib\\site-packages'

==============

Need help? Found a bug? Let us know! Big Grin
File bug reports on GitHub here: https://github.com/Miserlou/Zappa
And join our Slack channel here: https://slack.zappa.io
Love!,
~ Team Zappa!

(venv) C:\Python27\kodi-alexa>

It looks like my renaming of my working folder yesterday screwed things up. My folder is kodi-alexa and its looking for kodi-alexa-master. My zappa site on lambda is named kodi-alexa-dev.

What should I do? I don't know how to proceed or how, even to start over. Could I just delete the zappa site from Lambda, delete my working Kodi -Alexa folder from c:\Python27 and start over (saving my .env for reuse). Would the existing zappa an env installation screw me up if I tried that?

Is there a way to proceed?
(This post was last modified: 2017-05-24 17:05 by bill_orange.)
find quote
jingai Offline
Skilled Skinner
Posts: 2,103
Joined: Mar 2010
Reputation: 36
Post: #1449
Well, try renaming it back firstly Wink

Sent from my D5803 (typie typie)
find quote
bill_orange Offline
Senior Member
Posts: 170
Joined: Nov 2015
Reputation: 0
Post: #1450
I was hoping that was possible, but I could not find any sort of zappa config file.

For clarity (mainly to me) :

My Lambda site is named: kodi-alexa-dev.

My working folder is: c:\python27\kodi-alexa.

Zappa is (apparently) looking for: kodi-alexa-master.
(This post was last modified: 2017-05-24 17:40 by bill_orange.)
find quote
jingai Offline
Skilled Skinner
Posts: 2,103
Joined: Mar 2010
Reputation: 36
Post: #1451
I mean just rename the directory

Sent from my D5803 (typie typie)
find quote
bill_orange Offline
Senior Member
Posts: 170
Joined: Nov 2015
Reputation: 0
Post: #1452
Okay.

I used Windows 10 File History feature to roll back my Kodi-Alexa folder to before my many screw-ups. So I did this:

Download zip file and copy into working Kodi-Alexa folder

Take information from .env and copy into kodi.config template and save it in Kodi-alexa working folder

Run venv\Scripts\activate.bat

Run pip install -r requirements.txt ( all requirements were already met)

Run zappa update dev

Delete and replace all slots with a fresh set using your time saving utility

Delete and replace utterances and intents with new ones (I did not look to see if any changed)

Save and rebuild

Test... Hurray - it worked

Since I had so much self inflicted trouble with this, can you let me know if the procedure above is correct in both errors or omissions?

I would use this procedure the next time if it is okay. Although, really, next time I am temped to just delete my working folder after saving kodi.config and start over using git clone now that git is installed on my machine.

thanks - - Bill
find quote
jingai Offline
Skilled Skinner
Posts: 2,103
Joined: Mar 2010
Reputation: 36
Post: #1453
Yup what you did sounds fine.

Sent from my D5803 (typie typie)
find quote
Post Reply