Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread J D
Hi, For what it is worth. The file is not corrupt it just has tabs set to 8 spaces for indentation and space indentation set to 4 spaces. So if you replace the tabs with 8 spaces and leave the spaces along the file should indent correctly. If you use an Eclipse editor with a python plugin you ca

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
Perhaps, but it is working on my production system at the moment under python 2.7 On Fri, Feb 21, 2020, 5:34 PM vince wrote: > On Friday, February 21, 2020 at 2:27:34 PM UTC-8, J D wrote: >> >> Sorry to tell you but what you posted has indentation problems in many >> places. I would spend some t

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
Perhaps I'll leave this to actual programmers. If it is something easily done, I'm game. If it requires hours of hunt the wumpus, seems to be a useless endeavor. I've removed the tab/space problem. As I do not program, it's beyond me what level of indentation is needed. On Fri, Feb 21, 2020,

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread vince
On Friday, February 21, 2020 at 2:27:34 PM UTC-8, J D wrote: > > Sorry to tell you but what you posted has indentation problems in many > places. I would spend some time reading the link I sent you about python > indentation and try it again. > >> >> The file you are starting with is hosed on the

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
Well, considering that you didn't address any of the reported errors, I don't see what info would help. On Fri, Feb 21, 2020, 5:27 PM vince wrote: > On Friday, February 21, 2020 at 1:49:43 PM UTC-8, G Hammer wrote: >> >> No, it did not. I had already ran it through and found many errors. >> Goi

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread vince
On Friday, February 21, 2020 at 1:49:43 PM UTC-8, G Hammer wrote: > > No, it did not. I had already ran it through and found many errors. > Going to start from scratch, first removing all tabs in favor of 4 spaces. > Then run it through 2to3, then see what errors out. > > If you don't share with us

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread J D
Hi, Sorry to tell you but what you posted has indentation problems in many places. I would spend some time reading the link I sent you about python indentation and try it again. Thanks On Saturday, January 18, 2020 at 7:46:16 PM UTC-7, G Hammer wrote: > > I'd like to run v4 when I upgrade hardwa

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
File attached as rainmachine2.py On Friday, February 21, 2020 at 4:58:01 PM UTC-5, G Hammer wrote: > > Ok, downloaded the file, took the original expand --tabs=4 rainmachine.py > > temp.txt replaced the .py file with the .txt file resulting in a > rainmachine.py with no tabs. > Ran 2to3 get an

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
Ok, downloaded the file, took the original expand --tabs=4 rainmachine.py > temp.txt replaced the .py file with the .txt file resulting in a rainmachine.py with no tabs. Ran 2to3 get an error, a lone 'return' on line 67. RefactoringTool: There was 1 error: RefactoringTool: Can't parse rainmachin

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
No, it did not. I had already ran it through and found many errors. Going to start from scratch, first removing all tabs in favor of 4 spaces. Then run it through 2to3, then see what errors out. On Friday, February 21, 2020 at 4:27:13 PM UTC-5, vince wrote: > > On Friday, February 21, 2020 at 1:07

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
Thanks, I'll give it a try! On Friday, February 21, 2020 at 4:27:13 PM UTC-5, vince wrote: > > On Friday, February 21, 2020 at 1:07:39 PM UTC-8, J D wrote: >> >> Hi, >> So your edits for the tabs messed up the python indentation. I would go >> back to a previous version and make sure that for eac

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
I'll take the original and try expand to rid the file of spaces. On Friday, February 21, 2020 at 4:07:39 PM UTC-5, J D wrote: > > Hi, > So your edits for the tabs messed up the python indentation. I would go > back to a previous version and make sure that for each tab you find that > you put in

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread vince
On Friday, February 21, 2020 at 1:07:39 PM UTC-8, J D wrote: > > Hi, > So your edits for the tabs messed up the python indentation. I would go > back to a previous version and make sure that for each tab you find that > you put in the correct number of spaces so the code still lines up after > y

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread J D
Hi, So your edits for the tabs messed up the python indentation. I would go back to a previous version and make sure that for each tab you find that you put in the correct number of spaces so the code still lines up after you replace the tabs as it did before. This is why I need to see the actua

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
Attached. On Friday, February 21, 2020 at 3:43:12 PM UTC-5, J D wrote: > > Hi, > Need to see the actual file creating the error since you have been > changing it based on your previous posts. > Thanks > > On Saturday, January 18, 2020 at 7:46:16 PM UTC-7, G Hammer wrote: >> >> I'd like to run v4

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread J D
Hi, Need to see the actual file creating the error since you have been changing it based on your previous posts. Thanks On Saturday, January 18, 2020 at 7:46:16 PM UTC-7, G Hammer wrote: > > I'd like to run v4 when I upgrade hardware this week. > Seems to be doing fine for the devices and skin I

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
The code is located at gethub Rainmachine That page has some additional info that may be helpful as well. On Friday, February 21, 2020 at 3:28:28 PM UTC-5, J D wrote: > > Hi, > You need to post the actual code that produced this error if you want

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread J D
Hi, You need to post the actual code that produced this error if you want additional help. Thanks On Saturday, January 18, 2020 at 7:46:16 PM UTC-7, G Hammer wrote: > > I'd like to run v4 when I upgrade hardware this week. > Seems to be doing fine for the devices and skin I use. > With one except

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
Thanks, that got me through the formatting errors. No idea why sometimes in the same line use spaces tab spaces. But all that is cleaned up. Now, program logic is failing it seems. raceback (most recent call last): File "./bin/weewxd", line 261, in main() File "./bin/weewxd", line 148, i

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread J D
Hi, Python 3 does not allow tabs and spaces to be mixed. See https://www.python.org/dev/peps/pep-0008/ Most people just use an editor and replace the tabs with correct amount of spaces when they see this error. Thanks Jerry On Saturday, January 18, 2020 at 7:46:16 PM UTC-7, G Hammer wrote: > >

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread vince
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 ra

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-02-21 Thread G Hammer
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 No

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-19 Thread G Hammer
Excellent info, appreciated! On Sunday, January 19, 2020 at 7:52:14 PM UTC-5, Thomas Keffer wrote: > > Be sure to read the article *Python 3 strategy > * in the WeeWX > Wiki. > > -tk > > On Sun, Jan 19, 2020 at 2:04 PM G Hammer > > wrote: >

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-19 Thread Thomas Keffer
Be sure to read the article *Python 3 strategy * in the WeeWX Wiki. -tk On Sun, Jan 19, 2020 at 2:04 PM G Hammer wrote: > When I install the new system Tuesday, I plan to only install python 3. > Hopefully there won't be many changes that n

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-19 Thread G Hammer
When I install the new system Tuesday, I plan to only install python 3. Hopefully there won't be many changes that need done manually, but I'll see what transpires. Thanks! On Sunday, January 19, 2020 at 2:23:19 PM UTC-5, vince wrote: > > On Sunday, January 19, 2020 at 8:14:00 AM UTC-8, G Hamme

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-19 Thread vince
On Sunday, January 19, 2020 at 8:14:00 AM UTC-8, G Hammer wrote: > > Thanks for the tips, I'm going to see if I am able to get it working under > python 3 as that seems to be the future. Good to know that it may run as is > with WeeWX 4. > > > Just run it through "2to3 -w" to have it make the mos

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-19 Thread G Hammer
Thanks for the tips, I'm going to see if I am able to get it working under python 3 as that seems to be the future. Good to know that it may run as is with WeeWX 4. On Sunday, January 19, 2020 at 12:04:33 AM UTC-5, gjr80 wrote: > > As John said the code has not been ported to WeeWX v4 and defin

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-19 Thread G Hammer
Thanks for the information, I'll see if I'm able to get it ported. On Saturday, January 18, 2020 at 11:51:42 PM UTC-5, John Kline wrote: > > I had a quick look. It imports Queue (with a capital ‘Q’). That will > fail in python 3. > As such, this has not been ported. > > As for an answer to the

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-18 Thread gjr80
As John said the code has not been ported to WeeWX v4 and definitely will not run under WeeWX v4/python 3. That being said, it may work with WeeWX v4 when run under python 2; looking through the code quickly I don't see anything that obviously will not work under WeeWX v4/python 2. WeeWX v4 log

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-18 Thread John Kline
I had a quick look. It imports Queue (with a capital ‘Q’). That will fail in python 3. As such, this has not been ported. As for an answer to the general question, there are tools available to convert code (2to3, modernize). It usually requires more work than that, but you could run one of t

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-18 Thread Andrew Milner
why not ask the author of the extension then - if it is important to you to have the answer. After all, the author is the person who should have the answer. As to whether the author has tested against the beta version depends very much upon the time available to the author of the extension I

Re: [weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-18 Thread G Hammer
Seems that there should be a way to determine this as the change to Python 3 isn't just a WeeWX thing. As for whether or not to run the beta, it's beta 8 and what I use seems to be ok as far as reports go. Is it not what beta are for after all? Anyway, not what I asked, so let's see what else com

[weewx-user] Re: WeeWX v4 I Need an Extension Verified/Checked

2020-01-18 Thread Andrew Milner
I do not think v4 has officially been released yet - so I would recommend installing the new hardware with 3.9 and do the upgrade when v4 is finally released. That way you do not change the whole shebang - hardware and software - in one giant leap. Regarding 'how do you know' - the answer is t