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

[visibility-sheet] Causes traceback #1874

Closed
frosencrantz opened this issue Apr 25, 2023 · 5 comments
Closed

[visibility-sheet] Causes traceback #1874

frosencrantz opened this issue Apr 25, 2023 · 5 comments

Comments

@frosencrantz
Copy link
Contributor

Small description
visibility-sheet causes traceback

Expected result
No tracback when making rows mult.

Actual result with screenshot

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/visidata/mainloop.py", line 38, in drawSheet
    sheet.draw(scr)
  File "/usr/lib/python3.9/site-packages/visidata/sheets.py", line 705, in draw
    y += self.drawRow(scr, row, self.topRowIndex+rowidx, y, rowcattr, maxheight=self.windowHeight-y-1, **drawparams)
  File "/usr/lib/python3.9/site-packages/visidata/sheets.py", line 767, in drawRow
    height = min(self.calc_height(row, displines), maxheight) or 1  # display even empty rows
  File "/usr/lib/python3.9/site-packages/visidata/sheets.py", line 732, in calc_height
    lines = _splitcell(self, cellval.display, width=colwidth-2)
  File "/usr/lib/python3.9/site-packages/visidata/extensible.py", line 133, in call_if_not
    return func(self, *args, **kwargs)
  File "/usr/lib/python3.9/site-packages/visidata/sheets.py", line 26, in _splitcell
    for L in s.splitlines():
AttributeError: 'generator' object has no attribute 'splitlines'

https://asciinema.org/a/S3OgdQfnBL8cyOL3TAfWMgDTI

Steps to reproduce with sample data and a .vd
While in a sheet, type v, and get multiple tracebacks due to issue.

Additional context
Please include the version of VisiData. Latest version from develop.

@anjakefala
Copy link
Collaborator

Thanks for filing an issue!

We had a fix but it caused a problem with the sidebar, so we decided to not commit it to the repo. Still thinking about how to address this.

@frosencrantz
Copy link
Contributor Author

I am glad to see new fixes being added to the develop branch. This bug would also be very useful to fix if there is time.

@frosencrantz
Copy link
Contributor Author

Looks like it was reported again #2019 but with a possible fix from @ajkerrigan (#2020) Hooray!

@ajkerrigan
Copy link
Collaborator

ajkerrigan commented Sep 2, 2023

We had a fix but it caused a problem with the sidebar, so we decided to not commit it to the repo. Still thinking about how to address this.

Heh looks like I missed multiple flavors of history when looking into this 🙈. What sort of sidebar issues though? Wonder if my PR would have similar effects.

@saulpw
Copy link
Owner

saulpw commented Oct 18, 2023

I believe this is fixed now. Thanks to @ajkerrigan for providing the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants