Hi Tom
This what I get with the new ftpupload.py
May 29 12:01:40 raspberrypi weewx[2431] INFO weewx.reportengine: Copied 5
files to /var/www/html/weewx
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine: Caught
unrecoverable exception in generator 'weewx.reportengine.FtpGenerator'
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** __init__() got an unexpected keyword argument 'max_tries'
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** Traceback (most recent call last):
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** File "/usr/share/weewx/weewx/reportengine.py", line 197, in run
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** obj.start()
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** File "/usr/share/weewx/weewx/reportengine.py", line 280, in start
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** self.run()
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** File "/usr/share/weewx/weewx/reportengine.py", line 320, in run
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** secure_data=to_bool(self.skin_dict.get('secure_data', True)))
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** TypeError: __init__() got an unexpected keyword argument 'max_tries'
May 29 12:01:40 raspberrypi weewx[2431] ERROR weewx.reportengine:
**** Generator terminated
I get the same message whether secure_data is set to True or False.
Regards
Richard
On Thursday, May 28, 2020 at 9:28:49 PM UTC+1, Tom Keffer wrote:
>
> I just noticed that in refactoring the ftp uploader, the function
> _make_remote_dir() never gets called! Try this version of
> weeutil/ftpupload.py.
>
> -tk
>
>
>
> On Thu, May 28, 2020 at 12:50 PM Tom Keffer <[email protected]
> <javascript:>> wrote:
>
>> Hard to say, but I think you're getting hit by issue #284
>> <https://github.com/weewx/weewx/issues/284>. Try adding an option
>> secure_data and setting it to false:
>>
>> [[FTP]]
>> ...
>> secure_ftp = True
>> secure_data = False
>>
>> -tk
>>
>> On Thu, May 28, 2020 at 9:36 AM Richard Cropper <[email protected]
>> <javascript:>> wrote:
>>
>>> Thanks Tom
>>>
>>> I had in fact tried those steps but did so again, without success.
>>>
>>> Suspecting that the directory might be the cause even though its
>>> permissions looked good, I deleted the weewx directory and then created it
>>> again.
>>>
>>> This had made a difference but not solved the problem.
>>>
>>> Here's an extract from the log:
>>>
>>> May 28 17:24:35 raspberrypi weewx[723] ERROR weeutil.ftpupload: Attempt
>>> #1. Failed uploading /public_html/weewx/daytempfeel.png to
>>> polaris.servers.prgn.misp.co.uk. Reason: [Errno 32] Broken pipe
>>>
>>> May 28 17:24:35 raspberrypi weewx[723] ERROR weeutil.ftpupload: Attempt
>>> #2. Failed uploading /public_html/weewx/daytempfeel.png to
>>> polaris.servers.prgn.misp.co.uk. Reason: [Errno 32] Broken pipe
>>>
>>> May 28 17:24:35 raspberrypi weewx[723] ERROR weeutil.ftpupload: Attempt
>>> #3. Failed uploading /public_html/weewx/daytempfeel.png to
>>> polaris.servers.prgn.misp.co.uk. Reason: [Errno 32] Broken pipe
>>>
>>> May 28 17:24:35 raspberrypi weewx[723] ERROR weeutil.ftpupload: Failed
>>> to upload file /public_html/weewx/daytempfeel.png
>>>
>>> I have tried all possible file paths again, as you suggest but I always
>>> get this broken pipe message. If I extend the file path any higher, I get
>>> the 'cannot open this file' message.
>>>
>>> I have been able to upload the index file from /var/www/html/weewx to
>>> the weewx directory on my server using curl.
>>>
>>> Richard
>>>
>>> On Wednesday, May 27, 2020 at 7:56:28 PM UTC+1, Tom Keffer wrote:
>>>>
>>>> Two things to try:
>>>>
>>>> 1. Make sure the FTP username has write permissions on the server.
>>>>
>>>> 2. Try different variations on the FTP path. For example,
>>>>
>>>> path = public_html/weewx/ # What you have
>>>> path = public_html/weewx
>>>> path = /public_html/weewx/
>>>> path = /public_html/weewx
>>>> path = weewx
>>>> path = /weewx
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, May 27, 2020 at 10:02 AM Richard Cropper <[email protected]>
>>>> wrote:
>>>>
>>>>> Thanks Tom
>>>>>
>>>>> Yes all the files are in /var/www/html/weewx
>>>>>
>>>>> If I understand you correctly, this has more to do with the file path
>>>>> of the remote host server.
>>>>>
>>>>> I am at a loss to understand what is going on at that end.
>>>>>
>>>>> I can at least connect but I either get a message as you have seen or
>>>>> a 'broken pipe' message if I play around with the file path.
>>>>>
>>>>> I guess this is more to do with the remote server than weewx but
>>>>> thanks for your advice.
>>>>>
>>>>> Regards
>>>>>
>>>>> Richard
>>>>> On Wednesday, May 27, 2020 at 3:17:35 PM UTC+1, Tom Keffer wrote:
>>>>>>
>>>>>> Hello, Richard
>>>>>>
>>>>>> Unfortunately, the error message is misleading (and should be
>>>>>> changed). When it says
>>>>>>
>>>>>> Failed uploading public_html/weewx/monthtempfeel.png to
>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file or
>>>>>> directory
>>>>>>
>>>>>> what it means is it could not upload to the *target*
>>>>>> public_html/weewx/monthtempfeel.png*.* The unfortunate part is that
>>>>>> the error message doesn't give the source.
>>>>>>
>>>>>> Take a look in /var/www/html/weewx and make sure the files you expect
>>>>>> to be in there are actually in there.
>>>>>>
>>>>>> -tk
>>>>>>
>>>>>>
>>>>>> On Wed, May 27, 2020 at 5:50 AM Richard Cropper <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>> Having secured a connection, I still don't seem to be able to
>>>>>>> upload files
>>>>>>>
>>>>>>> I get the following error message on the log
>>>>>>>
>>>>>>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #1. Failed uploading public_html/weewx/monthtempfeel.png to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:36 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #2. Failed uploading public_html/weewx/monthtempfeel.png to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #3. Failed uploading public_html/weewx/monthtempfeel.png to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Failed to upload file public_html/weewx/monthtempfeel.png
>>>>>>>
>>>>>>> May 27 13:30:37 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #1. Failed uploading public_html/weewx/yearwind.png to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #2. Failed uploading public_html/weewx/yearwind.png to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #3. Failed uploading public_html/weewx/yearwind.png to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:38 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Failed to upload file public_html/weewx/yearwind.png
>>>>>>>
>>>>>>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #1. Failed uploading public_html/weewx/statistics.html to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:39 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #2. Failed uploading public_html/weewx/statistics.html to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #3. Failed uploading public_html/weewx/statistics.html to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>> May 27 13:30:40 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Failed to upload file public_html/weewx/statistics.html
>>>>>>>
>>>>>>> May 27 13:30:41 raspberrypi weewx[899] ERROR weeutil.ftpupload:
>>>>>>> Attempt #1. Failed uploading public_html/weewx/weekbarometer.png to
>>>>>>> ftp.tq7weather.uk. Reason: 553 Can't open that file: No such file
>>>>>>> or directory
>>>>>>>
>>>>>>>
>>>>>>> Here's the relevant bit of my weewx.conf:
>>>>>>>
>>>>>>>
>>>>>>> [[FTP]]
>>>>>>>
>>>>>>> # FTP'ing the results to a webserver is treated as just
>>>>>>> another report,
>>>>>>>
>>>>>>> # albeit one with an unusual report generator!
>>>>>>>
>>>>>>> skin = Ftp
>>>>>>>
>>>>>>>
>>>>>>> # If you wish to use FTP, set "enable" to "true", then
>>>>>>>
>>>>>>> # fill out the next four lines.
>>>>>>>
>>>>>>> # Use quotes around passwords to guard against parsing
>>>>>>> errors.
>>>>>>>
>>>>>>> enable = true
>>>>>>>
>>>>>>> user =[user name]
>>>>>>>
>>>>>>> password = [password]
>>>>>>>
>>>>>>> server = [server name] # The ftp server name, e.g,
>>>>>>> www.myserver.org
>>>>>>>
>>>>>>> path = public_html/weewx/ # The destination directory,
>>>>>>> e.g., /weather
>>>>>>>
>>>>>>>
>>>>>>> # Set to True for an FTP over TLS (FTPS) connection. Not all
>>>>>>> servers
>>>>>>>
>>>>>>> # support this.
>>>>>>>
>>>>>>> secure_ftp = True
>>>>>>>
>>>>>>> secure_data = True
>>>>>>>
>>>>>>>
>>>>>>> # To upload files from something other than what HTML_ROOT is
>>>>>>> set
>>>>>>>
>>>>>>> # to above, specify a different HTML_ROOT here.
>>>>>>>
>>>>>>> HTML_ROOT = /var/www/html/weewx/
>>>>>>>
>>>>>>>
>>>>>>> # Most FTP servers use port 21
>>>>>>>
>>>>>>> port = 21
>>>>>>>
>>>>>>>
>>>>>>> # Set to 1 to use passive mode, zero for active mode
>>>>>>>
>>>>>>> passive = 1
>>>>>>>
>>>>>>>
>>>>>>> The connection is FTP over TLS.
>>>>>>>
>>>>>>>
>>>>>>> My weather data is from an Aercus Weather Sleuth using interceptor
>>>>>>> on a Raspberry pi.
>>>>>>>
>>>>>>>
>>>>>>> It's as if FTP is looking for the wrong path on my pi but maybe I
>>>>>>> misunderstand the error message. That's why I tried removing the hash
>>>>>>> before HTML_ROOT but I got the same result with the hash.
>>>>>>>
>>>>>>>
>>>>>>> Otherwise very pleased with weewx which I can view on my pi using
>>>>>>> nginx
>>>>>>>
>>>>>>>
>>>>>>> Any help gratefully received.
>>>>>>>
>>>>>>>
>>>>>>> Richard
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> 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/35d77ba3-e9a1-4919-9b2e-bb0680490b8a%40googlegroups.com
>>>>>>>
>>>>>>> <https://groups.google.com/d/msgid/weewx-user/35d77ba3-e9a1-4919-9b2e-bb0680490b8a%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> --
>>>>> 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/65f68c3f-31e6-4e6f-95aa-0268a0a82f78%40googlegroups.com
>>>>>
>>>>> <https://groups.google.com/d/msgid/weewx-user/65f68c3f-31e6-4e6f-95aa-0268a0a82f78%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>> 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] <javascript:>.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/cc51fa47-91a9-4a06-838b-18a3ed7b3c2f%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/weewx-user/cc51fa47-91a9-4a06-838b-18a3ed7b3c2f%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>
--
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/b5faab8e-577f-402a-945a-7b16d8af981d%40googlegroups.com.