Map-A-Droid / MAD

Map PoGo stuff with Android devices
211 stars 133 forks source link

unsupported operand type(s) for +: 'decimal.Decimal' and 'float' #1344

Open JabLuszko opened 1 year ago

JabLuszko commented 1 year ago
[04-29 18:29:23.46] [           worker] [           zzzzz] [AbstractWorkerStrategy:182 ] [I] Walking roughly: 3.73m
[04-29 18:29:23.76] [           system] [           zzzzz] [    EnvironmentUtil:99  ] [E] unsupported operand type(s) for +: 'decimal.Decimal' and 'float'
Traceback (most recent call last):
  File "/home/crazyfrank/MAD/start.py", line 269, in <module>
    asyncio.run(start(), debug=True)
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
> File "/home/xxxx/MAD/mapadroid/utils/EnvironmentUtil.py", line 83, in _handle_task_result
    task.result()
  File "/home/xxx/MAD/mapadroid/worker/Worker.py", line 227, in _run_scan
    time_snapshot = await self._scan_strategy.move_to_location()
  File "/home/xxxx/MAD/mapadroid/worker/strategy/plain/AbstractWorkerMitmStrategy.py", line 79, in move_to_location
    await self._walk_after_teleport(walk_distance_post_teleport)
  File "/home/xxxx/MAD/mapadroid/worker/strategy/AbstractWorkerStrategy.py", line 185, in _walk_after_teleport
    Location(self._worker_state.current_location.lat + lat_offset,
TypeError: unsupported operand type(s) for +: 'decimal.Decimal' and 'float'

current_location.lat should be float, it's decimal.Decimal for some reason? I would guess this comes from walk_after_teleport_distance, but too sleepy to test it now, just leaving as an issue for tomorrow.

image