On Friday, February 21, 2020 at 10:35:01 AM UTC-8, G Hammer wrote:
>
> I have installed 4.0.b12 and running only python 3.
> I tried 2to3 on the rainmachine extension and while it had no errors in 
> completing, the resulting code is not proper.
> When I run weewx directly, it fails when loading rainmachine:
>  File "/home/weewx/bin/user/rainmachine.py", line 67
>     return None, None
>                     ^
> TabError: inconsistent use of tabs and spaces in indentation
>
> As I'm not a programmer, I have no idea of what use of tabs and spaces 
> would mean.
>
>
>
Python is particular about indentation of each line, requiring you to 
basically pick tabs or spaces when you want to indent.

You need to use one way (hint - pick spaces) consistently in a python file. 

My 'guess' is your line 67 has a tab in it.  Open it in an editor and 
backspace so it starts in column 1, then 'space' forward to set the proper 
indenting.  See if that's all that's needed.  If you used tabs on multiple 
lines, it'll complain every time until you get all the tabs replaced with 
spaces throughout.  Be very careful with not messing up the indentation.

If you're using vi or vim as an editor, I'd suggest you add "set expandtab" 
to your .vimrc file.  If you don't use vi or vim, ignore this sentence :-)


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/97871d98-17f5-43a1-aeb8-102979b8513a%40googlegroups.com.

Reply via email to