Comments (6)
Can you try with Python 2?
from google-assistant-samsung-smart-tv-integration.
With Python 2.7.9 and no changes to the script i get:
Traceback (most recent call last):
File "samsung-smart-tv-remote.py", line 3, in
import configparser, pika, json, time, samsungctl
ImportError: No module named configparser
from google-assistant-samsung-smart-tv-integration.
Then changing the configparser to ConfigParser as it appears to be using Python 3 naming "The ConfigParser module has been renamed to configparser in Python 3" but still running under Python 2.x i next get:
Traceback (most recent call last):
File "samsung-smart-tv-remote.py", line 8, in
params = pika.URLParameters(config['CloudAMQP']['url'])
AttributeError: ConfigParser instance has no attribute 'getitem'
from google-assistant-samsung-smart-tv-integration.
I guess something changed in the configparser library. I will try with a fresh setup and I would let you know.
from google-assistant-samsung-smart-tv-integration.
cool THANK YOU
from google-assistant-samsung-smart-tv-integration.
Almost Working!
So here is what I have done so far and the error now seems to be in the JSon Payload! Current error
TypeError: the JSON object must be str, not 'bytes'
Actions thus far:
Install pika and samsungctl for Python 3 with pip3
Install pip3 install pika
Install pip3 install samsungctl
Edit samsung-smart-tv-remote.py adding () to each print line
Run the python script using python3
python3 samsung-smart-tv-remote.py
Error on Pi when message is read:
pi@xxxxxx:~/SamsungTV $ python3 samsung-smart-tv-remote.py
Traceback (most recent call last):
File "samsung-smart-tv-remote.py", line 52, in
channel.start_consuming() # start consuming (blocks)
File "/usr/local/lib/python3.4/dist-packages/pika/adapters/blocking_connection.py", line 1780, in start_consuming
self.connection.process_data_events(time_limit=None)
File "/usr/local/lib/python3.4/dist-packages/pika/adapters/blocking_connection.py", line 716, in process_data_events
self._dispatch_channel_events()
File "/usr/local/lib/python3.4/dist-packages/pika/adapters/blocking_connection.py", line 518, in _dispatch_channel_events
impl_channel._get_cookie()._dispatch_events()
File "/usr/local/lib/python3.4/dist-packages/pika/adapters/blocking_connection.py", line 1403, in _dispatch_events
evt.body)
File "samsung-smart-tv-remote.py", line 39, in callback
message = json.loads(body)
File "/usr/lib/python3.4/json/init.py", line 312, in loads
s.class.name))
TypeError: the JSON object must be str, not 'bytes'
from google-assistant-samsung-smart-tv-integration.
Related Issues (2)
- glitch HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-assistant-samsung-smart-tv-integration.