code_browser.py importError: cannot import name 'VerticalScroll' from 'textual.containers' #2068
-
Following getting started when running in a clean 3.11 venv on an intel mac: cd textual/examples/
python code_browser.py ../ I get: Traceback (most recent call last):
File "/Users/david/Community/textual/examples/code_browser.py", line 17, in <module>
from textual.containers import Container, VerticalScroll
ImportError: cannot import name 'VerticalScroll' from 'textual.containers' (/Users/david/Community/textual/examples/.venv/lib/python3.11/site-packages/textual/containers.py) # Textual Diagnostics
## Versions
| Name | Value |
|---------|--------|
| Textual | 0.15.1 |
| Rich | 13.3.2 |
## Python
| Name | Value |
|----------------|--------------------------------------------------------------|
| Version | 3.11.2 |
| Implementation | CPython |
| Compiler | Clang 13.0.0 (clang-1300.0.29.30) |
| Executable | /Users/david/Community/textual/examples/.venv/bin/python3.11 |
## Operating System
| Name | Value |
|---------|---------------------------------------------------------------------------------------------------|
| System | Darwin |
| Release | 21.6.0 |
| Version | Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 |
## Terminal
| Name | Value |
|----------------------|-----------------|
| Terminal Application | vscode (1.76.1) |
| TERM | xterm-256color |
| COLORTERM | truecolor |
| FORCE_COLOR | *Not set* |
| NO_COLOR | *Not set* |
## Rich Console options
| Name | Value |
|----------------|----------------------|
| size | width=227, height=25 |
| legacy_windows | False |
| min_width | 1 |
| max_width | 227 |
| is_terminal | True |
| encoding | utf-8 |
| max_height | 25 |
| justify | None |
| overflow | None |
| no_wrap | False |
| highlight | None |
| markup | None |
| height | None | If I replace |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
From what you're saying, you seem to be using the latest release of Textual from PyPi to run the examples from Some breaking changes are currently happening so this would be expected if you were to mix these. If you are checking out the examples it'll be better to check out those tagged v0.15.1. |
Beta Was this translation helpful? Give feedback.
-
Thanks that does the trick. I initially discounted that as it was released only yesterday! Perhaps the docs when they suggest: git clone https://github.com/Textualize/textual.git To checkout the most recent release tag. |
Beta Was this translation helpful? Give feedback.
-
This is insightful thanks @davep. I'll close this discussion again now. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
From what you're saying, you seem to be using the latest release of Textual from PyPi to run the examples from
main
in the repo, is that correct?Some breaking changes are currently happening so this would be expected if you were to mix these. If you are checking out the examples it'll be better to check out those tagged v0.15.1.