Skip to content

Use true timestamp to avoid "Invalid timestamp"#1

Merged
Thibauth merged 1 commit intoThibauth:masterfrom
Crupuk:patch-1
Jul 22, 2013
Merged

Use true timestamp to avoid "Invalid timestamp"#1
Thibauth merged 1 commit intoThibauth:masterfrom
Crupuk:patch-1

Conversation

@Crupuk
Copy link
Copy Markdown
Contributor

@Crupuk Crupuk commented Jul 22, 2013

With the original version i got :

python /usr/lib/python2.6/site-packages/pushover.py --token "NU2LC5g2G9jgVR9eHVLYAUmkFuPeky" --client "FWhJFb5wgV35bmzmaxeV976K1WqaFE" "Hello"
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/pushover.py", line 227, in
url_title=args.url_title, timestamp=True)
File "/usr/lib/python2.6/site-packages/pushover.py", line 207, in send_message
return MessageRequest(payload)
File "/usr/lib/python2.6/site-packages/pushover.py", line 104, in init
Request.init(self, "post", MESSAGE_URL, payload)
File "/usr/lib/python2.6/site-packages/pushover.py", line 86, in init
raise RequestError(self.answer["errors"])
main.RequestError:
==> timestamp is invalid

By casting time.time() the error disappears

With the original version i got :

python /usr/lib/python2.6/site-packages/pushover.py --token "NU2LC5g2G9jgVR9eHVLYAUmkFuPeky" --client "FWhJFb5wgV35bmzmaxeV976K1WqaFE" "Hello"
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pushover.py", line 227, in <module>
    url_title=args.url_title, timestamp=True)
  File "/usr/lib/python2.6/site-packages/pushover.py", line 207, in send_message
    return MessageRequest(payload)
  File "/usr/lib/python2.6/site-packages/pushover.py", line 104, in __init__
    Request.__init__(self, "post", MESSAGE_URL, payload)
  File "/usr/lib/python2.6/site-packages/pushover.py", line 86, in __init__
    raise RequestError(self.answer["errors"])
__main__.RequestError:
==> timestamp is invalid


By casting time.time() the error disappears
Thibauth added a commit that referenced this pull request Jul 22, 2013
Use true timestamp to avoid "Invalid timestamp"
@Thibauth Thibauth merged commit e057972 into Thibauth:master Jul 22, 2013
@Thibauth
Copy link
Copy Markdown
Owner

This does the job indeed. I guess I forgot to test this case. Thanks a lot!

@Crupuk Crupuk deleted the patch-1 branch January 20, 2014 12:26
@Crupuk
Copy link
Copy Markdown
Contributor Author

Crupuk commented Aug 8, 2014

Could you please make a release ?

I just install it ( pip install python-pushover ) on a new server and still get the error.

Thanks

@Thibauth
Copy link
Copy Markdown
Owner

Thibauth commented Aug 9, 2014

Yes, I was thinking of doing this. It should hopefully happen this week-end.

@Thibauth
Copy link
Copy Markdown
Owner

Better late that never: new release is available on Pypi and can be install with pip install --upgrade python-pushover

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants