Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better date validation #4

Open
vit- opened this issue Jun 13, 2016 · 0 comments
Open

Add better date validation #4

vit- opened this issue Jun 13, 2016 · 0 comments

Comments

@vit-
Copy link
Owner

vit- commented Jun 13, 2016

Task exception was never retrieved
future: <Task finished coro=<UZScanner.scan() done, defined at /usr/src/app/uz/scanner.py:109> exception=ResponseError('status code: 200, request data: {\'another_ec\': 0, \'station_id_from\': \'2200001\', \'time_dep\': \'00:00\', \'search\': \'\', \'station_id_till\': \'2218000\', \'date_dep\': \'01.01.2016\', \'time_dep_till\': \'\'}, response body: b\'{"value":"You have entered invalid date","error":true,"data":null,"captcha":null}\'',)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/src/app/uz/scanner.py", line 117, in scan
    data['date'], data['source'], data['destination'], data['train_num'])
  File "/usr/src/app/uz/client/client.py", line 119, in fetch_train
    trains = await self.list_trains(date, source_station, destination_station)
  File "/usr/src/app/uz/client/client.py", line 115, in list_trains
    result = await self.call('purchase/search/', data=data)
  File "/usr/src/app/uz/client/client.py", line 94, in call
    raise ResponseError(response.status, body, kwargs.get('data'), json)
uz.client.exceptions.ResponseError: status code: 200, request data: {'another_ec': 0, 'station_id_from': '2200001', 'time_dep': '00:00', 'search': '', 'station_id_till': '2218000', 'date_dep': '01.01.2016', 'time_dep_till': ''}, response body: b'{"value":"You have entered invalid date","error":true,"data":null,"captcha":null}'
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

No branches or pull requests

1 participant