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

V1.25.0 Crashes on Windows 11 with Python 3.11.6 #672

Closed
5 tasks done
hcc-donder opened this issue Oct 25, 2024 · 2 comments · Fixed by #673
Closed
5 tasks done

V1.25.0 Crashes on Windows 11 with Python 3.11.6 #672

hcc-donder opened this issue Oct 25, 2024 · 2 comments · Fixed by #673
Labels
bug Something isn't working

Comments

@hcc-donder
Copy link

Before Proceeding, please acknowledge:

  • I have consulted the Troubleshooting guide.
  • I have searched Issues and Discussions in this repo.
  • Feature requests should be initiated as Discussions. This is a bug report.

Describe the bug

Installed and tried to run the command harlequin at the command line. Harlequin crashes with a long Traceback report.

To Reproduce

Installed and tried to run the command harlequin at the command line.

Expected behavior

To open harlequin with the default database selected.

Actual behavior

Crashes with the following:

╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\Users\donder\AppData\Local\pipx\pipx\venvs\harlequin\Lib\site-packages\textual\widget.py:3420 in render_lines     │
│                                                                                                                      │
│   3417 │   │   Returns:                                                                                              │
│   3418 │   │   │   A list of list of segments.                                                                       │
│   3419 │   │   """                                                                                                   │
│ ❱ 3420 │   │   strips = self._styles_cache.render_widget(self, crop)                                                 │
│   3421 │   │   return strips                                                                                         │
│   3422 │                                                                                                             │
│   3423 │   def get_style_at(self, x: int, y: int) -> Style:                                                          │
│                                                                                                                      │

... Locals removed

│                                                                                                                      │
│ C:\Users\donder\AppData\Local\pipx\pipx\venvs\harlequin\Lib\site-packages\textual\_styles_cache.py:119 in            │
│ render_widget                                                                                                        │
│                                                                                                                      │
│   116 │   │                                                                                                          │
│   117 │   │   base_background, background = widget._opacity_background_colors                                        │
│   118 │   │   styles = widget.styles                                                                                 │
│ ❱ 119 │   │   strips = self.render(                                                                                  │
│   120 │   │   │   styles,                                                                                            │
│   121 │   │   │   widget.region.size,                                                                                │
│   122 │   │   │   base_background,                                                                                   │
│                                                                                                                      │

... Locals removed

│                                                                                                                      │
│ C:\Users\donder\AppData\Local\pipx\pipx\venvs\harlequin\Lib\site-packages\textual\_styles_cache.py:218 in render     │
│                                                                                                                      │
│   215 │   │   render_line = self.render_line                                                                         │
│   216 │   │   for y in crop.line_range:                                                                              │
│   217 │   │   │   if is_dirty(y) or y not in self._cache:                                                            │
│ ❱ 218 │   │   │   │   strip = render_line(                                                                           │
│   219 │   │   │   │   │   styles,                                                                                    │
│   220 │   │   │   │   │   y,                                                                                         │
│   221 │   │   │   │   │   size,                                                                                      │
│                                                                                                                      │

... Locals removed

│                                                                                                                      │
│ C:\Users\donder\AppData\Local\pipx\pipx\venvs\harlequin\Lib\site-packages\textual\_styles_cache.py:441 in            │
│ render_line                                                                                                          │
│                                                                                                                      │
│   438 │   │   │   # Content with border and padding (C)                                                              │
│   439 │   │   │   content_y = y - gutter.top                                                                         │
│   440 │   │   │   if content_y < content_height:                                                                     │
│ ❱ 441 │   │   │   │   line = render_content_line(y - gutter.top)                                                     │
│   442 │   │   │   │   line = line.adjust_cell_length(content_width)                                                  │
│   443 │   │   │   else:                                                                                              │
│   444 │   │   │   │   line = [make_blank(content_width, inner)]                                                      │
│                                                                                                                      │

... Locals removed

│                                                                                                                      │
│ C:\Users\donder\AppData\Local\pipx\pipx\venvs\harlequin\Lib\site-packages\textual\widgets\_text_area.py:1217 in      │
│ render_line                                                                                                          │
│                                                                                                                      │
│   1214 │   │                                                                                                         │
│   1215 │   │   # Crop the line to show only the visible part (some may be scrolled out of view)                      │
│   1216 │   │   if not self.soft_wrap:                                                                                │
│ ❱ 1217 │   │   │   text_strip = text_strip.crop(                                                                     │
│   1218 │   │   │   │   scroll_x, scroll_x + virtual_width - gutter_width                                             │
│   1219 │   │   │   )                                                                                                 │
│   1220                                                                                                               │
│                                                                                                                      │

... Locals removed

│                                                                                                                      │
│ C:\Users\donder\AppData\Local\pipx\pipx\venvs\harlequin\Lib\site-packages\textual\strip.py:412 in crop               │
│                                                                                                                      │
│   409 │   │   │   │   │   if end_pos < end:                                                                          │
│   410 │   │   │   │   │   │   add_segment(segment)                                                                   │
│   411 │   │   │   │   │   else:                                                                                      │
│ ❱ 412 │   │   │   │   │   │   add_segment(segment.split_cells(end - pos)[0])                                         │
│   413 │   │   │   │   │   │   break                                                                                  │
│   414 │   │   │   │   │   pos = end_pos                                                                              │
│   415 │   │   │   │   │   segment = next(iter_segments, None)                                                        │
│                                                                                                                      │

... Locals removed

│                                                                                                                      │
│ C:\Users\donder\AppData\Local\pipx\pipx\venvs\harlequin\Lib\site-packages\rich\segment.py:171 in split_cells         │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AssertionError
_GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
Traceback (most recent call last):
  File "C:\Python\Python311\Lib\asyncio\queues.py", line 215, in join
    await self._finished.wait()
  File "C:\Python\Python311\Lib\asyncio\locks.py", line 213, in wait
    await fut
asyncio.exceptions.CancelledError
_GatheringFuture exception was never retrieved
future: <_GatheringFuture finished exception=CancelledError()>
Traceback (most recent call last):
  File "C:\Python\Python311\Lib\asyncio\queues.py", line 215, in join
    await self._finished.wait()
  File "C:\Python\Python311\Lib\asyncio\locks.py", line 213, in wait
    await fut
asyncio.exceptions.CancelledError

Contributing
Are you interested in contributing a fix?

  • No

What is the output of harlequin --version?

harlequin, version 1.25.0

Installed Adapters:
  - duckdb, version 1.25.0
  - sqlite, version 1.25.0
  - odbc, version 0.1.1

What database adapter are you using with Harlequin? (Default is duckdb)

I have installed duckdb, sqlite, and odbc but using the default.

What other options are you using when invoking Harlequin? (If you are using a profile, please add relevant items from your profile here).

I get this error whether I am using a profile or not. I deleted my profile after getting this error and still receive the error.

Can you tell us more about your system?

  • Shell: Tried in Windows Command Shell and PowerShell 7.4.6
  • Terminal: Tried in Cmder/ConEmu and in Windows Terminal
  • OS of the shell: Windows 11
  • OS of the terminal (if different from the shell): Windows 11
  • Default locale / language for your OS/Terminal/Shell:

How did you install Harlequin?

  • pipx
@hcc-donder hcc-donder changed the title V1.25.0 Crashes on Windows 11 with Python 1.11.3 V1.25.0 Crashes on Windows 11 with Python 3.11.3 Oct 25, 2024
@hcc-donder hcc-donder changed the title V1.25.0 Crashes on Windows 11 with Python 3.11.3 V1.25.0 Crashes on Windows 11 with Python 3.11.6 Oct 25, 2024
@tconbeer tconbeer added the bug Something isn't working label Oct 25, 2024
@tconbeer
Copy link
Owner

This shares the same upstream cause as #659
The latest version of Rich adds an assert, which causes this crash, instead of a hang. I will need to bump the Textual version to 0.85.0 to fix this issue in Harlequin

@patricksabry1
Copy link

@hcc-donder I just encountered this issue too, attempting to run Harlequin on WSL (Ubuntu) on Windows 11. I was able to resolve this for now by manually bumping Textual to latest (0.85.1) within my Python virtual env:

pip install textual==0.85.1

@tconbeer thanks for the time save and thanks for this wonderful tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants