Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-03 Thread Cat22


On Monday, March 2, 2020 at 4:19:55 AM UTC-8, gjr80 wrote:
>
> On Monday, 2 March 2020 20:12:09 UTC+10, Cat22 wrote:
>>
>> I am openSuse Tumbleweed (x86_64) and I had installed PyMySQL version 
>> 0.9.3-1.4 and just now i saw python2-PyMySQL 2.1.7-2.5 and tried that and 
>> it seems the 'cant find module'  message went away
>>
>
> Not somewhere you would normally go looking but It all seems rather 
> obvious given this comment 
>  in 
> mysql.py. It's not covered specifically (for Suse) in the WeeWX 
> documentation as I guess the assumption is that if you are advanced enough 
> to be configuring MySQL you should be advanced enough to know which package 
> to install to obtain the MySQLdb python package.
>
> Gary
>

Well, I guess I am SOL. 

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ef608cb3-1653-4810-9f88-b7c5233ded4b%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-02 Thread gjr80
On Monday, 2 March 2020 20:12:09 UTC+10, Cat22 wrote:
>
> I am openSuse Tumbleweed (x86_64) and I had installed PyMySQL version 
> 0.9.3-1.4 and just now i saw python2-PyMySQL 2.1.7-2.5 and tried that and 
> it seems the 'cant find module'  message went away
>

Not somewhere you would normally go looking but It all seems rather obvious 
given this comment 
 in 
mysql.py. It's not covered specifically (for Suse) in the WeeWX 
documentation as I guess the assumption is that if you are advanced enough 
to be configuring MySQL you should be advanced enough to know which package 
to install to obtain the MySQLdb python package.

Gary

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/bc531bff-58ef-4147-8ede-936733f775e8%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-02 Thread Andrew Milner
yes, if you have created a weewx user with correct permissions as described 
in the weewx documentation



On Monday, 2 March 2020 12:12:09 UTC+2, Cat22 wrote:
>
> I am openSuse Tumbleweed (x86_64) and I had installed PyMySQL version 
> 0.9.3-1.4 and just now i saw python2-PyMySQL 2.1.7-2.5 and tried that and 
> it seems the 'cant find module'  message went away
> it seems i now have a different issue tho, so I have a question, if I dont 
> have the weewx database created in mysql will weewx create it?
> e.g can i change the line in
>   [[archive_mysql]]
> database_type = MySQL
> database_name = weewx
> where database_name is weewx to something like database_name=wx ?
> if i do that will weewx create the database wx and populate it with the 
> necessary tables?
>
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c5a373b6-cc9b-4a42-a658-21d9849ec351%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-02 Thread Cat22
I am openSuse Tumbleweed (x86_64) and I had installed PyMySQL version 
0.9.3-1.4 and just now i saw python2-PyMySQL 2.1.7-2.5 and tried that and 
it seems the 'cant find module'  message went away
it seems i now have a different issue tho, so I have a question, if I dont 
have the weewx database created in mysql will weewx create it?
e.g can i change the line in
  [[archive_mysql]]
database_type = MySQL
database_name = weewx
where database_name is weewx to something like database_name=wx ?
if i do that will weewx create the database wx and populate it with the 
necessary tables?

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7f0aa2ac-fa85-4275-8b0c-ec554d62cbb1%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-01 Thread Andrew Milner
You have not answered Tom's questions:
What platform?
How did you install mysql driver?

Yes, there are many of us running weewx with mysql or mariadb

weewx 3.9 runs under python 2.7, weewx 4 (not yet released) will run under 
python 3




On Monday, 2 March 2020 07:34:13 UTC+2, Cat22 wrote:
>
>
>
> On Sunday, March 1, 2020 at 6:28:28 AM UTC-8, Thomas Keffer wrote:
>>
>> Which platform are you using?
>>
>> Looks like you did some kind of non-standard install of WeeWX, which is 
>> fine. I doubt it is the problem.
>>
>> However, how did you install the mysql driver? 
>>
>> -tk
>>
> I see that weewx/bin/weedb/mysql.py is not right, the date is out of sync. 
> If I do a weewx upgrade will that replace all the files such as mysql.py? 
>

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/3d72536c-60cb-4684-81f6-b2d209e7ddfc%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-01 Thread Cat22
So, as near as I can tell I am missing a module called _mysql_exceptions 
and I can not find that module to install it
Another question i have is: 
Is wewx supposed to run under python 2.7 or on python 3.x?
It seems its 2.7 to me, but I am no python programmer.
In any case pip2 pip2.7 and pip3  cant seem to find the module at all
Do any of you have weewx running with mysql?
I'm starting to wonder if its a bug in weewx code or not.

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0314f92c-8518-4fb5-b14f-c562c6587e38%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-01 Thread Cat22
I did an upgrade and i still cant get mysql to work
I can telnet into mysql on localhost ok and from a remote machine using the 
IP of the system with mysql on it
I wonder, what does mysql.py use for a connection ip? Hopefully its 
localhost

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/42a7130f-3c93-49ce-8019-c173f7ff4e3c%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-01 Thread Cat22


On Sunday, March 1, 2020 at 6:28:28 AM UTC-8, Thomas Keffer wrote:
>
> Which platform are you using?
>
> Looks like you did some kind of non-standard install of WeeWX, which is 
> fine. I doubt it is the problem.
>
> However, how did you install the mysql driver? 
>
> -tk
>
I see that weewx/bin/weedb/mysql.py is not right, the date is out of sync. 
If I do a weewx upgrade will that replace all the files such as mysql.py? 

-- 
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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/082d8739-a454-4e16-8d43-97111c2e375c%40googlegroups.com.


Re: [weewx-user] ImportError: No module named _mysql_exceptions

2020-03-01 Thread Thomas Keffer
Which platform are you using?

Looks like you did some kind of non-standard install of WeeWX, which is
fine. I doubt it is the problem.

However, how did you install the mysql driver?

-tk

On Sat, Feb 29, 2020 at 12:06 PM Cat22  wrote:

> Hi,
> weewx 3.9.2
>   I am adding the mysql capability to my weewx install and having some
> trouble getting it going. (sqlite is working though)
> I have verified the username and password work ok from a command prompt
> and the table(s) are there imported from a previous system and they are
> readable
> The issue sems to be the proper python files but I have installed what
> looked right (I am on openSuse Tumbleweed x86_64)
> TIA
> Cat22
> Here is the relevant parts of my weewx.conf:
>
> #   This section binds a data store to a database.
>
> [DataBindings]
>
> [[wx_binding]]
> # The database must match one of the sections in [Databases].
> # This is likely to be the only option you would want to change.
> #database = archive_sqlite
> database = archive_mysql
> # The name of the table within the database
> table_name = archive
> # The manager handles aggregation of data for historical summaries
> manager = weewx.wxmanager.WXDaySummaryManager
> # The schema defines the structure of the database.
> # It is *only* used when the database is created.
> schema = schemas.wview.schema
>
>
> ##
>
> #   This section defines various databases.
>
> [Databases]
>
> # A SQLite database is simply a single file
> [[archive_sqlite]]
> database_type = SQLite
> database_name = weewx.sdb
>
> # MySQL
> [[archive_mysql]]
> database_type = MySQL
> database_name = weewx
>
>
> ##
>
> #   This section defines defaults for the different types of databases.
>
> [DatabaseTypes]
>
> # Defaults for SQLite databases
> [[SQLite]]
> driver = weedb.sqlite
> # Directory in which the database files are located
> SQLITE_ROOT = %(WEEWX_ROOT)s/archive
>
> # Defaults for MySQL databases
> [[MySQL]]
> driver = weedb.mysql
> # The host where the database is located
> host = localhost
> # The user name for logging in to the host
> user = 
> # The password for the user name
> password = 
>
>
>
> And here is the error from journalctl:
>
>  engine: Using Python 2.7.17 (default, Oct 24 2019, 12:43:41) [GCC]
>  engine: Platform Linux-5.4.14-x86_64-with-glibc2.2.5
>  engine: Locale is 'en_US.UTF-8'
>  engine: Using configuration file /usr/local/bin/weewx/weewx.conf
>  engine: Loading station type Vantage (weewx.drivers.vantage)
>  engine: StdConvert target unit is 0x1
>  wxcalculate: The following values will be calculated: barometer=
> prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware,
> appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware
> , heatindex=prefer_hardware>
>  wxcalculate: The following algorithms will be used for calculations:
> altimeter=aaNOAA, maxSolarRad=RS
>  engine: Archive will use data binding wx_binding
>  engine: Record generation will be attempted in 'hardware'
>  engine: Using archive interval of 300 seconds (specified by hardware)
>  engine: Caught unrecoverable exception in engine:
>    No module named _mysql_exceptions
>    Traceback (most recent call last):
>  File "/usr/local/bin/weewx/bin/weewx/engine.py", line 888, in
> main
>    engine = engine_class(config_dict)
>  File "/usr/local/bin/weewx/bin/weewx/engine.py", line 78, in
> __init__
>   Traceback (most recent call last):
> File "/usr/local/bin/weewx/bin/weewxd", line 64, in 
>   weewx.engine.main(options, args)
> File "/usr/local/bin/weewx/bin/weewx/engine.py", line 888, in main
>    self.loadServices(config_dict)
>   engine = engine_class(config_dict)
> File "/usr/local/bin/weewx/bin/weewx/engine.py", line 78, in __init__
>   self.loadServices(config_dict)
> File "/usr/local/bin/weewx/bin/weewx/engine.py", line 142, in
> loadServices
>   self.service_obj.append(weeutil.weeutil._get_object(svc)(self,
> config_dict))
> File "/usr/local/bin/weewx/bin/weewx/engine.py", line 500, in __init__
>   self.setup_database(config_dict)
> File "/usr/local/bin/weewx/bin/weewx/engine.py", line 608, in
> setup_database
>  File "/usr/local/bin/weewx/bin/weewx/engine.py", line 142, in
> loadServices
>   dbmanager = self.engine.db_binder.get_manager(self.data_binding,
> initialize=True)
> File "/usr/local/bin/weewx/bin/weewx/manager.py", line 872, in
> get_manager
>   self.manager_cache[data_binding] = open_manager(manager_dict,
> initialize)
> File "/usr/local/bin/weewx/bin/weewx/manager.py",