alfred82santa / whalesong

Whalesong is an asyncio python library to manage WebApps remotely. Currently WhatsappWeb is implemented
https://whalesong.readthedocs.io
MIT License
51 stars 19 forks source link

Bug on real time location #73

Closed jesusvalverde closed 5 years ago

jesusvalverde commented 5 years ago

If you use actual location (mi ubicación actual in Spanish) all goes OK....BUT if you use "on real time" (en tiempo real) you get this..

year 49122572 is out of range Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/managers/message.py", line 101, in call return cls.__message_classes__[t](data=data, *args, **kwargs) KeyError: 'location'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/driver_firefox.py", line 149, in poll await self.result_manager.set_partial_result(result['exId'], result['params']) File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/results.py", line 280, in set_partial_result await cast(BasePartialResult, self._pendant[result_id]).set_partial_result(data) File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/results.py", line 115, in set_partial_result await self._set_result(self.map(data)) File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/results.py", line 47, in map return self.fn_map(data) File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/managers/init.py", line 161, in fn_map=lambda evt: cls.MODEL_MANAGER_CLASS.map_model(evt['item']))) File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/managers/init.py", line 93, in map_model return cls.MODEL_CLASS(data) File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/managers/message.py", line 104, in call return cls.message_classes[MessageTypes(t)](data=data, *args, **kwargs) File "/home/ubuntu/.local/lib/python3.6/site-packages/whalesong/managers/message.py", line 90, in call return super(MessageMetaclass, cls).call__(data=data, *args, **kwargs) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/models.py", line 182, in init__ self.import_data(data) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/models.py", line 301, in import_data self._import_data(data) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/models.py", line 308, in _import_data setattr(self, key, value) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/fields.py", line 116, in set set_value(value) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/fields.py", line 112, in set_value self.set_value(obj, self.use_value(v)) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/fields.py", line 58, in use_value return self.convert_value(value) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/fields.py", line 152, in inner return func(self, value) File "/home/ubuntu/.local/lib/python3.6/site-packages/dirty_models/fields.py", line 567, in convert_value return datetime.fromtimestamp(value, tz=self.default_timezone) ValueError: year 49122572 is out of range

Found the error is over ""sequence = DateTimeField()"" on the 505 lines message.py file, buy as long I dont know what else afect this line I wont make upload the file.

alfred82santa commented 5 years ago

Could you test it?

jesusvalverde commented 5 years ago

Working Fine !!!