TypeError: __init__() got an unexpected keyword argument 'timeout'

861 views
Skip to first unread message

Jason Wheatley

unread,
Apr 17, 2016, 8:40:04 AM4/17/16
to pywws
Hi everyone,

My Twitter and FTP uploads seemed to have stopped. The log entry and my ini file are below.

Things have been fine until recently. Possibly happened after I updated pywws??? I did re-process all the data after the update.

Any advice on how to sort the problem would be most welcome.


Cheers,

Jason


Log File

2016-04-17 13:25:02:pywws.Logger:pywws version 15.12.0
2016-04-17 13:25:58:pywws.ToService(underground_rf):rsp: success
2016-04-17 13:27:04:pywws.LiveLog:__init__() got an unexpected keyword argument 'timeout'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pywws/LiveLog.py", line 86, in LiveLog
    tasks.do_tasks()
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 340, in do_tasks
    self._do_common(sections)
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 237, in _do_common
    self.do_twitter(template, live_data)
  File "/usr/local/lib/python2.7/dist-packages/pywws/Tasks.py", line 388, in do_twitter
    self.twitter = ToTwitter.ToTwitter(self.params)
  File "/usr/local/lib/python2.7/dist-packages/pywws/ToTwitter.py", line 126, in __init__
    self.api = PythonTwitterHandler(key, secret, latitude, longitude)
  File "/usr/local/lib/python2.7/dist-packages/pywws/ToTwitter.py", line 96, in __init__
    timeout=30)
TypeError: __init__() got an unexpected keyword argument 'timeout'
2016-04-17 13:30:01:pywws.Logger:pywws version 15.12.0

ini File

[config]
ws type = 1080
day end hour = 9
gnuplot encoding = iso_8859_1
language = en
logdata sync = 1
rain day threshold = 0.2
template encoding = iso-8859-1
usb activity margin = 3.0
pressure offset = 4.9
frequent writes = False
gnuplot version = 4.6
asynchronous = False

[fixed]
station clock = 1365620624.45
sensor clock = 1365620436.04
pressure offset = -7.1

[paths]
templates = /home/pi/weather/templates/
graph_templates = /home/pi/weather/graph_templates/
work = /home/pi/weather/temp
local_files = /home/pi/weather/results/

[live]
services = ['underground_rf']
twitter = []
plot = []
text = [('yowindow.xml')]

[logged]
plot = ['rose_1hr.png.xml', 'rose_12hrs.png.xml']
text = ['1hrs.txt', '6hrs.txt', '12hrs.txt', '6hrs_html_cp.txt', 'forecast_icon.txt']
twitter = []
services = ['underground', 'metoffice']

[hourly]
last update = 
plot = ['24hrs_full_features.png.xml', '24hrs.png.xml', 'rose_24hrs.png.xml', '2014.png.xml']
text = [('tweet.txt', 'T'),'feed_hourly.xml', '24hrs.txt']
services = []

[12 hourly]
services = []
twitter = []
text = [('forecast_tweet.txt', 'T')]
plot = []

[daily]
last update = 
plot = ['7days.png.xml', '2014.png.xml', '28days.png.xml', '365days.png.xml', 'rose_7days_nights.png.xml']
text = ['feed_daily.xml', 'forecast_week.txt', '7days.txt', 'allmonths.txt']
twitter = []
services = []

[ftp]
local site = False
secure = True
site = ftp.xxx.xxx
user = username
password = xxxx
directory = /stuff
port = zz

[Zambretti]
north = True
baro upper = 1050.0
baro lower = 950.0

[twitter]
key = myKey
secret = mySecret

[metoffice]
site id = sideID
aws pin = sitePin
template = default

[underground]
station = MyID
password = MyPassword
template = default


Jim Easterbrook

unread,
Apr 17, 2016, 1:40:11 PM4/17/16
to py...@googlegroups.com
On 17/04/16 13:40, Jason Wheatley wrote:
>
> My Twitter and FTP uploads seemed to have stopped. The log entry and my
> ini file are below.
>
> Things have been fine until recently. Possibly happened after I updated
> pywws??? I did re-process all the data after the update.
>
>
> / File "/usr/local/lib/python2.7/dist-packages/pywws/ToTwitter.py",
> line 96, in __init__/
> / timeout=30)/
> /TypeError: __init__() got an unexpected keyword argument 'timeout'/
> /2016-04-17 13:30:01:pywws.Logger:pywws version 15.12.0/

Try updating python-twitter. I can't remember when its 'timeout' option
was introduced, but it's a while ago.
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Jason Wheatley

unread,
Apr 17, 2016, 1:57:36 PM4/17/16
to pywws
Thanks Jim. That seems to have fixed it.


Cheers,

Jason
Reply all
Reply to author
Forward
0 new messages