Well, I figured out the 
problem: https://github.com/pyserial/pyserial/issues/59

Somehow I need to use a version of pyserial that's not 3.0.1, because 3.0.1 
has a bug that involves working with socat and that breaks everything.... 

Anyone have advice on how to install a newer version of pyserial that will 
be compatible with the dpkg install of weewx?

On Sunday, November 6, 2016 at 7:07:16 PM UTC-6, David Kowis wrote:
>
> I hacked in an exception stack trace: 
>
> ```
> exception details Traceback (most recent call last):
>   File "/usr/share/weewx/weewx/engine.py", line 107, in setupStation
>     self.console = loader_function(config_dict, self)
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 27, in loader
>     return VantageService(engine, config_dict)
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 1703, in __init__
>     Vantage.__init__(self, **config_dict[DRIVER_NAME])
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 476, in __init__
>     self.port.openPort()
>   File "/usr/share/weewx/weewx/drivers/vantage.py", line 283, in openPort
>     self.serial_port = serial.Serial(self.port, self.baudrate, 
> timeout=self.timeout)
>   File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 180, 
> in __init__
>     self.open()
>   File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 311, 
> in open
>     self._update_dtr_state()
>   File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 605, 
> in _update_dtr_state
>     fcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)
> IOError: [Errno 22] Invalid argument
> ```
>
> An invalid argument? Is this a library problem, or a permissions problem, 
> I'm not familiar enough with python to know exactly why it's upset here, 
> but it seems to be dying in the library, not in weewx... maybe?
>
> On Sunday, November 6, 2016 at 4:39:09 PM UTC-6, David Kowis wrote:
>>
>> Of note: I started weewx as root and it has the exact same errors, so I 
>> don't think it's who I'm running it as.
>>
>> On Sunday, November 6, 2016 at 4:38:18 PM UTC-6, David Kowis wrote:
>>>
>>> I had it working on an archlinux box, and I'm slowly changing my boxes 
>>> over to Ubuntu.
>>>
>>> It's not starting:
>>>
>>> ```
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Initializing weewx 
>>> version 3.6.1
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using Python 2.7.12 
>>> (default, Jul  1 2016, 15:12:24) #012[GCC 5.4.0 20160609]
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Platform 
>>> Linux-4.4.0-45-generic-x86_64-with-Ubuntu-16.04-xenial
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Using configuration 
>>> file /etc/weewx/weewx.conf
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Loading station type 
>>> Vantage (weewx.drivers.vantage)
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: import of driver failed: [Errno 
>>> 22] Invalid argument (<type 'exceptions.IOError'>)
>>> Nov  6 16:35:28 ubuntubase weewx[15446]: engine: Unable to load driver: 
>>> [Errno 22] Invalid argument
>>> Nov  6 16:35:28 ubuntubase weewx[15446]:     ****  Exiting...
>>> ```
>>>
>>> I'm using an IP-to-serial connector that connects my old Vantage Pro via 
>>> socat. That's working fine and is creating things according to the right 
>>> user.
>>>
>>> The only changes from default installation are to have weewx run as 
>>> non-root, and the socket is created as the same user (weewx, weewx)
>>>
>>> Can anyone point me at why I'm getting an IO error, or how to get more 
>>> information? I'm going to keep hacking at it, and see if I can't figure it 
>>> out myself, but google isn't showing me anything :(
>>>
>>> Thanks,
>>> David Kowis
>>>
>>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to