Giter VIP home page Giter VIP logo

Comments (21)

Pizzaface avatar Pizzaface commented on September 19, 2024

Sorry about that!

Used an old snippet of code to write this line, and while I had fixed the issue on my Pi, I forgot to update the files on my host. I've since fixed the issue in 8546f6e.

dbConnect accepts no arguments, as it uses the "conn" global set on line 12 of raspberry.py:
conn = pymysql.connect("RASP_PI_DNS", user="MYSQL_USER", passwd="MYSQL_PASS", db="DB_NAME")

As for your Indentation error, I would look and see if it's tabbed out or spaced out. This sometimes happens between programs.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

Hey @Pizzaface thanks for getting back to me! This seems to have resolved the global host + NameError issue, many kudos! However now I am getting this:

   Found ChromeCast: ['Krypton', 'Vegeta', 'Terran']
   Traceback (most recent call last):

 File "raspberry.py", line 94, in <module>
       dbConnect()

 File "raspberry.py", line 48, in dbConnect
       cur.execute("SELECT * FROM commands ORDER BY TIMESTAMP DESC LIMIT 1 ;")

 File "/home/transmission/srvr/Alexa/pymysql/cursors.py", line 161, in execute
       result = self._query(query)

 File "/home/transmission/srvr/Alexa/pymysql/cursors.py", line 317, in _query
       conn.query(q)

 File "/home/transmission/srvr/Alexa/pymysql/connections.py", line 835, in query
       self._affected_rows = self._read_query_result(unbuffered=unbuffered)

File "/home/transmission/srvr/Alexa/pymysql/connections.py", line 1019, in _read_query_result
       result.read()

 File "/home/transmission/srvr/Alexa/pymysql/connections.py", line 1302, in read
       first_packet = self.connection._read_packet()

 File "/home/transmission/srvr/Alexa/pymysql/connections.py", line 981, in _read_packet
       packet.check_error()

 File "/home/transmission/srvr/Alexa/pymysql/connections.py", line 393, in check_error
       err.raise_mysql_exception(self._data)

 File "/home/transmission/srvr/Alexa/pymysql/err.py", line 120, in raise_mysql_exception
       _check_mysql_exception(errinfo)

 File "/home/transmission/srvr/Alexa/pymysql/err.py", line 112, in _check_mysql_exception
       raise errorclass(errno, errorvalue)
          pymysql.err.ProgrammingError: (1146, u"Table 'chromey.commands' doesn't exist")

Perhaps I should reclone and start over?

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

(1146, u"Table 'chromey.commands' doesn't exist") means that your table doesn't exist inside your database. Try just doing "commands" instead. you've already specified the database in your connection string, if that doesn't work, try recloning.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

You are correct! I don't have any tables defined...for some reason I'm not able to removed "chromey.commands." I will try recloning this afternoon and let you know how that works.

Just curious, what types of tables have you created within your db?

Thanks again for all of the support @Pizzaface! I really appreciate it!

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

Not a problem!

You can get my Database Structure from "build.sql" located in the repo.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

You rock!

I updated the data tables, no it seems to hang after finding the chromecasts.

Will try to reclone and start over, I'll let you know of my progress. Thanks again @Pizzaface!

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

Make sure you define a Chromecast, (I had my ChromeCast name in there still, but have since fixed the issue).

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

I'd noticed that earlier and swapped it out with my ChromeCast name, additioanlly I just updated my code with the line: chromecast_name = "YOUR_CHROMECAST_NAME"

I'm still hanging after the string of chromecasts are returned.

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

Then it's because you haven't issued any commands, try issuing a command.

On Sat, Jul 23, 2016 at 12:57 PM Noirad [email protected] wrote:

I'd noticed that earlier and swapped it out with my ChromeCast name,
additioanlly I just updated my code with the line: chromecast_name =
"YOUR_CHROMECAST_NAME"

I'm still hanging after the string of chromecasts are returned.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJjV6qzO9MG1SNj1C0648wgU11YSzAvjks5qYkfkgaJpZM4JSd_D
.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

Alexa "There was a problem with the requested skills response. In app I see this error.

I'm guessing these errors are due to my configuration of the app in AWS?

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

Are you getting any issues in Lambda?

On Sat, Jul 23, 2016 at 1:12 PM Noirad [email protected] wrote:

Alexa "There was a problem with the requested skills response. In app I
see this error
https://drive.google.com/open?id=0B76FmSgsTcs2ODg4MmFFTE1qVE0.

I'm guessing these errors are due to my configuration of the app in AWS?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJjV6ixhQksgCkMd5SNlKS11mOqJRkiMks5qYkuQgaJpZM4JSd_D
.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

It looks like I've isolated the problem to the setup of the Lambda Function. Once I complete the setup, it results in this error:

{
  "errorMessage": "Unable to import module 'index'"
}

Here's the CloudWatch log:

> Event Data
> START RequestId: d7053329-5129-11e6-bdd7-154f0ce2b955 Version: $LATEST 
> Unable to import module 'index': No module named index  
> END RequestId: d7053329-5129-11e6-bdd7-154f0ce2b955 
> REPORT RequestId: d7053329-5129-11e6-bdd7-154f0ce2b955    Duration: 0.34 ms   Billed 
> Duration: 100 ms Memory Size: 128 MB  Max Memory Used: 14 MB

I'm fairly sure everything else is working right. I can connect to the database remotely. I can try to edit rows of the database and see the raspberry.py application respond to my (invalid) entires. So I'm thinking that index.py file is where my breakdown is occurring.

Also, If you've got any tips on manually controlling raspberry.py by way of wither CLI commands or manual database entries to control the chromecast that would be great. I just want to see that I've got everything sorted on that end too (if possible). I think I might be running into noobish issues with mysql when making attempts at manual entries.

Thank you for all of the support @Pizzaface, I really appreciate your help!

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

Try creating a test event in lambda with your test query, and take a
picture of the response.

On Sat, Jul 23, 2016 at 6:35 PM Noirad [email protected] wrote:

Currently this:
https://drive.google.com/open?id=0B76FmSgsTcs2dnpFaEcySmVGTEU The
target Lambda application returned a failure response. Lambda issue is
appearing.

Is there a command line to test the apps ability to control Chromecast
manually?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJjV6rkotMsFuMtKoimzEKrRY2Y0jZCeks5qYpdGgaJpZM4JSd_D
.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

Hey @Pizzaface not sure if the email feature in github forwards updates to comments but is that what you meant? re my earlier comment:

"It looks like I've isolated the problem to the setup of the Lambda Function. Once I complete the setup, it results in this error:

{
  "errorMessage": "Unable to import module 'index'"
}
Here's the CloudWatch log:
> Event Data
> START RequestId: d7053329-5129-11e6-bdd7-154f0ce2b955 Version: $LATEST 
> Unable to import module 'index': No module named index  
> END RequestId: d7053329-5129-11e6-bdd7-154f0ce2b955 
> REPORT RequestId: d7053329-5129-11e6-bdd7-154f0ce2b955    Duration: 0.34 ms   Billed 
> Duration: 100 ms Memory Size: 128 MB  Max Memory Used: 14 MB
I'm fairly sure everything else is working right. I can connect to the database remotely. I can try to edit rows of the database and see the raspberry.py application respond to my (invalid) entires. So I'm thinking that index.py file is where my breakdown is occurring.

Also, If you've got any tips on manually controlling raspberry.py by way of wither CLI commands or manual database entries to control the chromecast that would be great. I just want to see that I've got everything sorted on that end too (if possible). I think I might be running into noobish issues with mysql when making attempts at manual entries.

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

Can you take a picture of your configuration tab on lambda?

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

Yup here is a screenshot of the Lambda config and this is a screenshot of the error when testing.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

My bad here is the Lambda configuration screenshot

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

It looks like there's a problem with your zip file. Can you show me the contents?

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

These are the files stored in alexaChromcecast.zip

from alexa-chromecast-skill-2.0.

Pizzaface avatar Pizzaface commented on September 19, 2024

It's something wrong with your Zip File, however, I'm unsure what, if you
PM me on Reddit (Pizzaface97), I'd be more than happy to assist you further.

On Sun, Jul 24, 2016 at 12:18 AM Noirad [email protected] wrote:

These are the files stored in alexaChromcecast.zip
https://drive.google.com/open?id=0B76FmSgsTcs2cFE5R09zY1BMVkE


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJjV6glSS5zvfaNdc8U46hHudBnJsT97ks5qYueQgaJpZM4JSd_D
.

from alexa-chromecast-skill-2.0.

Noirad avatar Noirad commented on September 19, 2024

Awesome @Pizzaface, thank you so much!

from alexa-chromecast-skill-2.0.

Related Issues (20)

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.