I'm trying to run a very basic sample but I'm getting this error.
from finalynx import Portfolio, Assistant, Folder, Line
portfolio = Portfolio(
Folder('Short term',
children=[
Line("Some fund"),
]
)
)
Assistant(portfolio).run()
[16:38:19] Done fetching Finary data. finary_fetch.py:125
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ │
│ /Users/zulufoxtrot/Library/CloudStorage/[email protected]/My │
│ Drive/docs/projets/dev/python/finary_assistant/main.py:10 in <module> │
│ │
│ 7 │ │ ] │
│ 8 │ │ ) │
│ 9 ) │
│ ❱ 10 Assistant(portfolio).run() │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/finalynx/assistant.py:105 in run │
│ │
│ 102 │ │ ] │
│ 103 │ │ │
│ 104 │ │ # Display the entire portfolio and associated recommendations │
│ ❱ 105 │ │ console.print("\n", Columns(panels, padding=(2, 10))) │
│ 106 │
│ │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/rich/console.py:1634 in print │
│ │
│ 1631 │ │ │ render = self.render │
│ 1632 │ │ │ if style is None: │
│ 1633 │ │ │ │ for renderable in renderables: │
│ ❱ 1634 │ │ │ │ │ extend(render(renderable, render_options)) │
│ 1635 │ │ │ else: │
│ 1636 │ │ │ │ for renderable in renderables: │
│ 1637 │ │ │ │ │ extend( │
│ │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/rich/console.py:1272 in render │
│ │
│ 1269 │ │ │ ) │
│ 1270 │ │ _Segment = Segment │
│ 1271 │ │ _options = _options.reset_height() │
│ ❱ 1272 │ │ for render_output in iter_render: │
│ 1273 │ │ │ if isinstance(render_output, _Segment): │
│ 1274 │ │ │ │ yield render_output │
│ 1275 │ │ │ else: │
│ │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/rich/columns.py:79 in __rich_console__ │
│ │
│ 76 │ │ column_count = len(renderables) │
│ 77 │ │ │
│ 78 │ │ get_measurement = Measurement.get │
│ ❱ 79 │ │ renderable_widths = [ │
│ 80 │ │ │ get_measurement(console, options, renderable).maximum │
│ 81 │ │ │ for renderable in renderables │
│ 82 │ │ ] │
│ │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/rich/columns.py:80 in <listcomp> │
│ │
│ 77 │ │ │
│ 78 │ │ get_measurement = Measurement.get │
│ 79 │ │ renderable_widths = [ │
│ ❱ 80 │ │ │ get_measurement(console, options, renderable).maximum │
│ 81 │ │ │ for renderable in renderables │
│ 82 │ │ ] │
│ 83 │ │ if self.equal: │
│ │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/rich/measure.py:109 in get │
│ │
│ 106 │ │ │ ] = getattr(renderable, "__rich_measure__", None) │
│ 107 │ │ │ if get_console_width is not None: │
│ 108 │ │ │ │ render_width = ( │
│ ❱ 109 │ │ │ │ │ get_console_width(console, options) │
│ 110 │ │ │ │ │ .normalize() │
│ 111 │ │ │ │ │ .with_maximum(_max_width) │
│ 112 │ │ │ │ ) │
│ │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/rich/panel.py:214 in __rich_measure__ │
│ │
│ 211 │ def __rich_measure__( │
│ 212 │ │ self, console: "Console", options: "ConsoleOptions" │
│ 213 │ ) -> "Measurement": │
│ ❱ 214 │ │ _title = self._title │
│ 215 │ │ _, right, _, left = Padding.unpack(self.padding) │
│ 216 │ │ padding = left + right │
│ 217 │ │ renderables = [self.renderable, _title] if _title else [self.r │
│ │
│ /Users/zulufoxtrot/.local/share/virtualenvs/finary_assistant/lib/python3.9/site-pa │
│ ckages/rich/panel.py:108 in _title │
│ │
│ 105 │ │ │ title_text = ( │
│ 106 │ │ │ │ Text.from_markup(self.title) │
│ 107 │ │ │ │ if isinstance(self.title, str) │
│ ❱ 108 │ │ │ │ else self.title.copy() │
│ 109 │ │ │ ) │
│ 110 │ │ │ title_text.end = "" │
│ 111 │ │ │ title_text.plain = title_text.plain.replace("\n", " ") │
╰──────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'Folder' object has no attribute 'copy'