I don't use Windows; Linux only. I didn't really change driver. I changed 
database. What changed in the working weewx.conf file (on the new system) 
was that I uncommented things (copied over originally from the old 
weex.conf) to enable uploads to wunderground and other services. I may have 
been precipitate in assuming that there must be something wrong with the 
database but I couldn't see anything wrong in the weewx.conf file. 

My hesitation about a dump/restore was that SQLbrowser showed at lot of 
tables and I didn't know if the database structure would be *fully* 
identical across two versions--given additional fields and data and 
starting versions. If it is, then of course I'm happy to follow the posts 
to address the merge question -- I've done similar things with MySQL dumps 
(I still think a merge tool would be nice to have--like a "wunderfixer" of 
one's own :-).

I've uploaded the bad weewx.conf with credentials etc removed. I'll take 
another look -- for non-printable characters and mismatched brackets 
tomorrow. Thanks.

On Wednesday, March 17, 2021 at 8:28:48 PM UTC vince wrote:

> That's many items in one post.....
>
> You likely have a typo in weewx.conf but without seeing yours it's 
> impossible to know where.   Typically people mess up the [[ ]] number of 
> brackets and have a mismatched number of brackets someplace.  It's also 
> possible you have a non-printable character in there, or alternately you 
> have a windows EOL rather than unix EOL if you did anything on a windows 
> system.  There are many possible ways to mess the file up.
>
> You can easily merge databases by doing a dump/restore of the archive 
> table, then rebuild your daily summaries and 'probably' the NOAA pages. 
>  There are numerous posts for how to do this.
>
> Moving to a new station is in the wiki as "Change from one driver to 
> another" which mentions how to do that.   Follow it.  Some drivers ask 
> questions so simply editing weewx.conf is not a guaranteed win.
>
> On Wednesday, March 17, 2021 at 12:39:05 PM UTC-7 PJO wrote:
>
>>
>> I have been running a FineOffset WH1080 for a few years with a Raspberry 
>> Pi 2 running Raspbian. Recently I added an Ecowitt GW1000 and have it 
>> running satisfactorily using this driver 
>> https://github.com/gjr80/weewx-gw1000 on Ubuntu Core on a Pi 3. 
>>
>> Last night, having finished a new skin, I tried to transfer the weewx.sdb 
>> from the old to the new system, thinking (stupidly, hah) that with the same 
>> versions of WeeWX (4.4.0) it would be compatible. The result:
>>
>> Mar 17 01:11:27 ubuntu weewx[1844]:  * Starting weewx weather system weewx
>> Mar 17 01:11:28 ubuntu weewx[1907] INFO __main__: Initializing weewx 
>> version 4.4.0
>> Mar 17 01:11:28 ubuntu weewx[1907] INFO __main__: Using Python 3.8.5 
>> (default, Jan 27 2021, 15:41:15) #012[GCC 9.3.0]
>> Mar 17 01:11:28 ubuntu weewx[1907] INFO __main__: Platform 
>> Linux-5.4.0-1030-raspi-aarch64-with-glibc2.29
>> Mar 17 01:11:28 ubuntu weewx[1907] INFO __main__: Locale is 
>> 'LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=en_GB.UTF-8;LC_TIME=en_GB.utf-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=C;LC_PAPER=en_GB.UTF-8;LC_NAME=en_GB.UTF-8;LC_ADDRESS=en_GB.UTF-8;LC_TELEPHONE=en_GB.UTF-8;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=en_GB.UTF-8'
>> Mar 17 01:11:28 ubuntu weewx[1907] INFO __main__: PID file is 
>> /var/run/weewx.pid
>> Mar 17 01:11:29 ubuntu weewx[1934] ERROR __main__: Error parsing config 
>> file: Parsing failed with several errors.#012First error at line 153. File 
>> /etc/weewx/weewx.conf
>> Mar 17 01:11:29 ubuntu weewx[1844]:    ...done.
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****  Traceback 
>> (most recent call last):
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****    File 
>> "/usr/share/weewx/weewxd", line 126, in main
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****      
>> config_path, config_dict = weecfg.read_config(options.config_path, 
>> list(args))
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****    File 
>> "/usr/share/weewx/weecfg/__init__.py", line 176, in read_config
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****      
>> config_dict = configobj.ConfigObj(config_path,
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****    File 
>> "/usr/lib/python3/dist-packages/configobj.py", line 1229, in __init__
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****      
>> self._load(infile, configspec)
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****    File 
>> "/usr/lib/python3/dist-packages/configobj.py", line 1318, in _load
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****      raise 
>> error
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****    File 
>> "<string>", line None
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****  
>> configobj.ConfigObjError: Parsing failed with several errors.
>> Mar 17 01:11:29 ubuntu weewx[1934] CRITICAL __main__:     ****  First 
>> error at line 153. File /etc/weewx/weewx.conf
>>
>> I inspected weewx.conf and did't find anything obviously wrong, nor was 
>> there anything very interesting at line 153 (part of [[wunderground]], all 
>> commented out).
>>
>> There must be something I missed. The GW1000 is reporting some extra 
>> variables so I presume this may be an issue?
>>
>> I should have run wee_config? I thought just manually editing weex.conf 
>> was all I needed to do (having read this: 
>> https://github.com/weewx/weewx/wiki/Change-driver)
>>
>> *Then*: What is the best way to merge two overlapping weewx.sdb 
>> databases? I think I'm not the only one who would like it to be easier 
>> (suggestion not a complaint)
>>
>> I found references here 
>> <https://groups.google.com/g/weewx-user/c/c8lDKojbHGs/m/v8753on3BQAJ> to 
>> a file called transfer_db.py, indicated as NOT TESTED, and what followed 
>> required some tacit knowledge / familiarity with Python and, imo, would 
>> benefit from some elaboration. 
>>
>> Alternatively, shouldn't *wee_import* be able to import from another 
>> weewx.sdb file (ideally with start and end dates)? A straight transfer 
>> isn't what I want, in any case, as the databases overlap. I know I can go 
>> figure out what the dateTimes are and could look at using SQL to drop 
>> records, but I think a convenient default MIGHT be to provide an option like
>>
>> *merge_db weewx1.sdb weewx2.sdb --output=weewx3.sdb 
>> --overlap-prefer=weewx2.sdb*
>>
>> I had a quick look at the databases with SQLbrowser 
>> <https://sqlitebrowser.org/> but didn't do anything with it yet as I 
>> don't know what I should be expecting to see (I'm happy to manually merge 
>> dumped SQL records if I can interpret what they are and if I know that the 
>> database structure is the same/compatible; as it was my first time using 
>> this I realized I'd prefer, ideally, to have some instructions and perhaps 
>> one or more plugins, if there's one for displaying dateTimes eg. I haven't 
>> looked into this further yet--it'll involve a time commitment I'd happily 
>> avoid for a one-off operation; though SQLbrowser does look potentially 
>> useful for editing anomalous records however).
>>
>> Would a simple merge tool be handy for anyone running two stations and 
>> suffering occasional outages? A wiki page on "Moving to a New Station"? 
>>
>

-- 
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/5b803a72-c397-4c41-9b44-b839e47106e4n%40googlegroups.com.

Reply via email to