peterbrittain / asciimatics

A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations
Apache License 2.0
3.62k stars 237 forks source link

Some examples don't work (fix). #337

Closed snooppr closed 2 years ago

snooppr commented 2 years ago

Bad examples: https://github.com/peterbrittain/asciimatics/blob/master/samples/bars.py https://github.com/peterbrittain/asciimatics/blob/master/samples/particles.py https://github.com/peterbrittain/asciimatics/blob/master/samples/player.py

from asciimatics.constants import SINGLE_LINE, DOUBLE_LINE, ASCII_LINE
ImportError: cannot import name 'SINGLE_LINE' from 'asciimatics.constants'

TypeError: __init__() got an unexpected keyword argument 'diameter'

from asciimatics.renderers import AnsiArtPlayer, AsciinemaPlayer, SpeechBubble
ImportError: cannot import name 'AnsiArtPlayer' from 'asciimatics.renderers'

OS GNU/Linux

peterbrittain commented 2 years ago

Those are all recent changes in master that have yet to be publsihed to pypi, so I suspect that you are running the wrong version of asciimatics for those samples.

Can you please confirm which version of asciimatics you are running? If you are running a version on pypi, please use the samples in the tagged branch for your version - e.g. https://github.com/peterbrittain/asciimatics/tree/v1.13/samples (note the v1.13 in the URL).

snooppr commented 2 years ago

I have installed asciimatics via pip But examples, just did a git clone repo and went in to test.

You can close the problem.