pikers / piker

(e2e) foss trading for non-tinas
GNU Affero General Public License v3.0
104 stars 17 forks source link

Editting initial live order load fails? #502

Open goodboy opened 1 year ago

goodboy commented 1 year ago

This seems to only happen when trying to edit an order after it is first loaded and displayed (as a level line) and the order was pre-existing before booting up the chart app?

/home/goodboy/.virtualenvs/piker310/src/pyqtgraph/pyqtgraph/GraphicsScene/GraphicsScene.py:352: RuntimeWarning: Error sending hover exit event:
Traceback (most recent call last):
  File "/home/goodboy/.virtualenvs/piker310/bin/piker", line 33, in <module>
    sys.exit(load_entry_point('piker', 'console_scripts', 'piker')())
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/goodboy/.virtualenvs/piker310/lib/python3.10/site-packages/click/decorators.py", line 38, in new_func
    return f(get_current_context().obj, *args, **kwargs)
  File "/home/goodboy/repos/piker/piker/ui/cli.py", line 176, in chart
    _main(
  File "/home/goodboy/repos/piker/piker/ui/_app.py", line 184, in _main
    run_qtractor(
  File "/home/goodboy/repos/piker/piker/ui/_exec.py", line 201, in run_qtractor
    app.exec_()
  File "/home/goodboy/.virtualenvs/piker310/src/pyqtgraph/pyqtgraph/widgets/GraphicsView.py", line 348, in mouseReleaseEvent
    super().mouseReleaseEvent(ev)
  File "/home/goodboy/.virtualenvs/piker310/src/pyqtgraph/pyqtgraph/GraphicsScene/GraphicsScene.py", line 230, in mouseReleaseEvent
    if self.sendDragEvent(ev, final=True):
  File "/home/goodboy/.virtualenvs/piker310/src/pyqtgraph/pyqtgraph/GraphicsScene/GraphicsScene.py", line 352, in sendDragEvent
    debug.printExc("Error sending hover exit event:")
  --- exception caught here ---
  File "/home/goodboy/.virtualenvs/piker310/src/pyqtgraph/pyqtgraph/GraphicsScene/GraphicsScene.py", line 350, in sendDragEvent
    self.dragItem.mouseDragEvent(event)
  File "/home/goodboy/repos/piker/piker/ui/_lines.py", line 290, in mouseDragEvent
    self._on_drag_end(self)
  File "/home/goodboy/repos/piker/piker/ui/order_mode.py", line 470, in order_line_modify_complete
    self.client.update_nowait(
  File "/home/goodboy/repos/piker/piker/clearing/_client.py", line 104, in update_nowait
    msg = cmd.copy(update=data)
  File "/home/goodboy/repos/piker/piker/data/types.py", line 78, in copy
    ).decode(
msgspec.ValidationError: Expected `str`, got `object` - at `$.symbol`
  debug.printExc("Error sending hover exit event:")

Looks like something to do with the startup attribute for the Order.symbol being an actual Symbol instead of str?