Does not upload to web site

19 views
Skip to first unread message

Nick McGill

unread,
Sep 10, 2010, 3:29:49 PM9/10/10
to pywws
Hi,

I seem to be unable to upload to my web site. The user credentials are
ok., an I get the following:
~/weather$ ./Hourly.py -v
20:12:32:pywws.LogData:Synchronising to weather station
20:13:49:pywws.LogData:Fetching data
20:13:49:pywws.LogData:1 records written
20:13:49:pywws.Process:Generating summary data
20:13:49:pywws.Process:day: 2010-09-09T21:00:00
20:13:49:pywws.Process.Acc:2010-09-10 15:14:00 rain reset 2499.6 ->
46.8
20:13:49:pywws.Process:month: 2010-09-01T21:00:00
20:13:49:pywws.Upload:Uploading to web site

weather.ini:
[hourly]
underground = False
twitter = []
plot = []
text = []

[ftp]
secure = False
site = ftp.mcgill.org.uk
local site = False
user = [myuser]
directory = httpdocs/weather/data/
password = [mypassword]

[fixed]
read period = 10
pressure offset = 10.6

[config]
gnuplot encoding = iso_8859_1
day end hour = 21
language = en_GB

[paths]
templates = /home/nick/weather/templates/
graph_templates = /home/nick/weather/graph_templates/
work = /tmp/weather

using 247
svn checkout http://pywws.googlecode.com/svn/trunk/ weather
Checked out revision 247.

====================
The directory I'm uploading to exists, although if I introduce an
error in the path, no error is shown.

Any help gratefully received

Nick

Jim Easterbrook

unread,
Sep 11, 2010, 4:40:06 AM9/11/10
to py...@googlegroups.com
Nick McGill wrote:
>
> I seem to be unable to upload to my web site. The user credentials are
> ok., an I get the following:
> ~/weather$ ./Hourly.py -v
> 20:12:32:pywws.LogData:Synchronising to weather station
> 20:13:49:pywws.LogData:Fetching data
> 20:13:49:pywws.LogData:1 records written
> 20:13:49:pywws.Process:Generating summary data
> 20:13:49:pywws.Process:day: 2010-09-09T21:00:00
> 20:13:49:pywws.Process.Acc:2010-09-10 15:14:00 rain reset 2499.6 ->
> 46.8
> 20:13:49:pywws.Process:month: 2010-09-01T21:00:00
> 20:13:49:pywws.Upload:Uploading to web site

All of which looks OK.

> [ftp]
> secure = False
> site = ftp.mcgill.org.uk
> local site = False
> user = [myuser]
> directory = httpdocs/weather/data/
> password = [mypassword]

> The directory I'm uploading to exists, although if I introduce an


> error in the path, no error is shown.
>
> Any help gratefully received

One possibility is to change the directory from httpdocs/weather/data/
to /httpdocs/weather/data/ (i.e. adding a leading slash). Upload.py used
to do this itself, until it started causing problems for some users.
(Some ftp servers expect relative paths, some expect absolute.) This is
consistent with your observation that setting a wrong directory causes
no error - I ought to add a test for this.
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Nick McGill

unread,
Sep 12, 2010, 5:03:13 AM9/12/10
to pywws
I tried that, no joy.

On further investigation, it looks like the templates are not being
scanned or used - do I need to place any entries in the ini file for
these?

TIA

Nick

Nick McGill

unread,
Sep 12, 2010, 6:54:34 AM9/12/10
to pywws
It appears that it's not the upload causing the problem, but the
template files are not being processed.
On my system, r239 works and r240 onwards do not - all using a r245
ini file.

I'll try & investigate further, but I'm a complete n00b at python!

All the best

Nick

Jim Easterbrook

unread,
Sep 12, 2010, 2:30:57 PM9/12/10
to py...@googlegroups.com
On 12/09/2010 11:54, Nick McGill wrote:
> It appears that it's not the upload causing the problem, but the
> template files are not being processed.
> On my system, r239 works and r240 onwards do not - all using a r245
> ini file.

r240 is when I introduced the new 'Tasks' module to handle templating,
graphing and uploading at hourly, 12-hourly or daily intervals. I
haven't properly documented this yet. There are new sections in
weather.ini where you list the templates to be processed, e.g.

[hourly]
underground = True
twitter = ['tweet.txt']
plot = ['7days.png.xml', '24hrs.png.xml', 'rose_12hrs.png.xml']
text = ['24hrs.txt', '6hrs.txt', '7days.txt', 'allmonths.txt']

[daily]


underground = False
twitter = []

plot = ['2009.png.xml', '2010.png.xml', '28days.png.xml']
text = ['feed_daily.xml']

[12 hourly]


underground = False
twitter = []
plot = []
text = []

Previous versions just processed everything in the template directories
every hour.

Nick McGill

unread,
Sep 13, 2010, 6:40:22 AM9/13/10
to pywws
That's the answer!

Thanks for all your hard work

Nick
Reply all
Reply to author
Forward
0 new messages