dropbox-api-command icon indicating copy to clipboard operation
dropbox-api-command copied to clipboard

Can't call method "epoch" on an undefined value at /usr/local/bin/dropbox-api line 1115

Open woodsb02 opened this issue 9 years ago • 6 comments

On FreeBSD 12-current r310018, I am getting the following error when trying to sync with dropbox-api-command-2.09:

$ dropbox-api sync dropbox:/ Dropbox/
Can't call method "epoch" on an undefined value at /usr/local/bin/dropbox-api line 1115.

Line 1115 is: my $remote_epoch = $strp->parse_datetime($content->{client_modified})->epoch;

Note that I have p5-DateTime-Format-Strptime-1.70 installed.

Any ideas what this could be?

woodsb02 avatar Dec 19 '16 13:12 woodsb02

Exactly the same issue on FreeBSD 11.0-RELEASE-p6 and dropbox-api-command-2.09,1.

rixkTM avatar Dec 29 '16 12:12 rixkTM

Same here, this has only started happening recently. I am running FreeBSD "11.0-RELEASE-p6" and dropbox-api-command "2.09,1" too. An update of all outdated Perl modules followed by a reinstallation of dropbox-api-command did not fix the problem. I have no experience of Perl so I cannot be much use on this one, sorry.

Guymer avatar Dec 31 '16 13:12 Guymer

It fixed it with this fix.

https://github.com/s-aska/dropbox-api-command/commit/752344f78f94ecfbb07aa4203e2ecf937a739dac

Thank you and happy new year!

s-aska avatar Jan 01 '17 15:01 s-aska

Hi s-aska, Thanks for the fix, however it is still giving me an error:

$ dropbox-api sync Dropbox/ dropbox:/
upload test.txt /test.txt
2017-01-02T01:39:21 [WebService::Dropbox] [ERROR] https://content.dropboxapi.com/2/files/upload {"path":"/test.txt","mode":"overwrite","client_modified":"2017-01-01T17:37:16ZZ"} -> [400] Error in call to API function "files/upload": HTTP header "Dropbox-API-Arg": client_modified: unconverted data remains: Z at /usr/local/lib/perl5/site_perl/WebService/Dropbox.pm line 184.
Error in call to API function "files/upload": HTTP header "Dropbox-API-Arg": client_modified: unconverted data remains: Z at /usr/local/bin/dropbox-api line 981.

Regards, Ben

woodsb02 avatar Jan 01 '17 17:01 woodsb02

I think that it was fixed in 2.11, Thank you for confirmation.

https://github.com/s-aska/dropbox-api-command/commit/7c9ceb9ff590b51b635b55aaf17a1f7c209151bc

s-aska avatar Jan 01 '17 19:01 s-aska

Thank you @s-aska that fixed it (and thank you @woodsb02 for pushing the update out to the ports tree quickly).

Guymer avatar Jan 02 '17 10:01 Guymer