Notices


Reply
Thread Tools
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#811
Hi Slarti,

The gprs_usage has syntax error and already revised.

Pls find blw error screenshot and files of profilematice_active_rules.py and battery_remaining.py
https://www.dropbox.com/s/br4nlq7brw...8_22-55-17.png
https://www.dropbox.com/s/tff3jp2dc25yz8s/DOWNLOAD8.rar

Tks,
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#812
Originally Posted by tonyhuynh View Post
Hi Slarti,

The gprs_usage has syntax error and already revised.

Pls find blw error screenshot and files of profilematice_active_rules.py and battery_remaining.py
https://www.dropbox.com/s/br4nlq7brw...8_22-55-17.png
https://www.dropbox.com/s/tff3jp2dc25yz8s/DOWNLOAD8.rar

Tks,
You have some weird characters in the indentations. What did you use to save the scripts?

Use nano to edit the characters out and you'll be fine.
 

The Following User Says Thank You to slarti For This Useful Post:
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#813
I used KhtSimpleText to save the scripts. I will try with Nano. Tks!
 
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#814
Hi Slarti,

I remove some invalid blocks and find nothing, but still error. Pls find blw and extend your help.
https://www.dropbox.com/s/f7nsel4dqw...9_06-04-50.png
https://www.dropbox.com/s/gxpoybnr9a...DOWNLOAD8b.rar

Tks,
 
MK99's Avatar
Posts: 644 | Thanked: 480 times | Joined on Jul 2012 @ Finland
#815
tonyhuynh,

You have:
Code:
if hours == 1:
result.append('%d hour' % hours)
Should be:
Code:
if hours == 1:
 result.append('%d hour' % hours)
See the space before "result". Small but significant difference.
 

The Following User Says Thank You to MK99 For This Useful Post:
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#816
Exactly, the indentations are there for a reason. Somehow they got filled with crap when you copied the scripts but they need to be there.

Should look something like this:

Last edited by slarti; 2013-04-19 at 09:34.
 

The Following User Says Thank You to slarti For This Useful Post:
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#817
Hi MK99 and Slarti,

battery_remaining.py SOLVED!

Now new "stone" with prafilematic_active_rules.py. Pls find blw error and file. I have tried to add "space" one by one up to 5 "space" before the word "continue" but still face error.. Pls help!

https://www.dropbox.com/s/qhiz19n7e9...9_18-29-28.png
https://www.dropbox.com/s/rabwfoipza...tive_rules.rar

Tks,
 
Posts: 277 | Thanked: 319 times | Joined on Jan 2010
#818
The indentations are tab lengths. In other words, one level of indentation is one press of a tab key and two levels is two presses and so on. The command continue is at two levels of indentation.

I guess the recommended way of indenting in python is four spaces per level, but I used tabs. Sue me

This made me laugh out loud on StackOverflow:

Thus spake the Lord: Thou shalt indent with four spaces. No more, no less. Four shall be the number of spaces thou shalt indent, and the number of thy indenting shall be four. Eight shalt thou not indent, nor either indent thou two, excepting that thou then proceed to four. Tabs are right out.
-- Georg Brandl

Last edited by slarti; 2013-04-19 at 12:21.
 

The Following 2 Users Say Thank You to slarti For This Useful Post:
MK99's Avatar
Posts: 644 | Thanked: 480 times | Joined on Jul 2012 @ Finland
#819
I think you have the same problem as before.
You should pay attention to where lines begin.
Check the original.
 

The Following User Says Thank You to MK99 For This Useful Post:
Posts: 142 | Thanked: 72 times | Joined on Jan 2013
#820
Poor me! Everything SOLVED!

I open another topic (or "stupid" up to you!)

I like to add the icon "RM" in the same line with the script but the result, as you find blw, it drops down to the second line(?) May this issue be solved?

https://www.dropbox.com/s/t71ora8149...9_19-46-30.png

Tks,
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:45.