Comments (13)
Oh I know ... I wanted to have fixed that before the release. Let me guess: You used spaces to indent? In my development I used accidently tabs instead of spaces. I fixed it now.
from siri-api.
ok thank you.
After upgrade now i:
root@ubuntu:~/Siri-API-master# python3 server.py
Traceback (most recent call last):
File "server.py", line 7, in
from commands import commands
File "/root/Siri-API-master/commands.py", line 23
html = document(self.connection)
^
TabError: inconsistent use of tabs and spaces in indentation
from siri-api.
What do you have in line 23 in commands.py? Do you have still the light definition or did you replace it?
from siri-api.
i have:
def remote(self, q, wildcards):
html = document(self.connection)
html.redirect("http://192.168.0.5/freeremote/" ) #Only works in my setup
html.send()
from siri-api.
You have to indent the commands bellow the def to tell Python that this code is for the definition. It is the same with if and while statements. In most languages indention is just for readability but in Python it is required to parse the code. Your example has to look like this:
def remote(self, q, wildcards):
html = document(self.connection)
html.redirect("http://192.168.0.5/freeremote/" ) #Only works in my setup
html.send()
from siri-api.
yes these github which to remove the spaces, the code looks like this
from siri-api.
Did you use tabs or spaces for indention?
from siri-api.
i use spaces
from siri-api.
What happens if you use tabs? I guess you haven't updated to commands.py with my latest update?
from siri-api.
yes i have the latest.
I copied / pasted a piece of one of your light control and now it works
from siri-api.
I tried to get a word to send to an online dictionary.
if I said "dictionary" + word it displays the error "Sorry, I do not know how to Do That"
this the code:
from siri-api.
So as I can see you tried to use wilcards. By default, you seperate just words with a comma. One of these words have to match to call the assigned function. If you want to use wildcards you can also define multiple sentences which can be useful if there are different dictions or if Siri understands often similar words.
So you have to tell the search function that you want to search with wildcards. Since you need multiple parts in a sentence it is stored in a dictionary. I will add this in the documentation in detail in the next days.
So you have to put brackets around your statement
..["dictionaire", "*"]..
from siri-api.
great thank's so much, now work fine now.
is the code i have put for dictionary.
Many thank's for your help
from siri-api.
Related Issues (20)
- Siri internal Bing search?? HOT 2
- Squid dosent start on startup HOT 2
- Voice feedback support HOT 3
- No such file or directory proxy.pac HOT 10
- Google Siri turn on light one dont work HOT 1
- Squid The requested url could not be retrieved HOT 1
- Issue with iOS8 HOT 6
- google normally appears HOT 65
- Squid does not forward to Siri-API HOT 1
- plugin for siri api HOT 1
- Siri API installation on RPi HOT 1
- This page is unavailable HOT 5
- afetr run Squid ... HOT 8
- https resquest HOT 1
- Html respond auto close HOT 5
- Deal with upper and lower cases HOT 6
- Using wildcard for the first search word does not work HOT 10
- Search defect HOT 2
- Problem with Raspberry Pi and Python HOT 9
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 siri-api.