Skip to content

TypeError: a bytes-like object is required, not 'str' #700

Closed
@gordio

Description

@gordio

You may understand…

(venv) Ori@gordio ~/Development/python/sk-numbers
❱bpython
bpython version 0.16 on top of Python 3.6.2 /Users/gordio/Development/python/sk-numbers/venv/bin/python3
>>> import matplotlib.pyplot as plt
>>> plt.plot([1,2,2.5,3])
[<matplotlib.lines.Line2D object at 0x10cd60320>]
>>> plt.show()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    plt.show()
  File "/Users/gordio/Development/python/sk-numbers/venv/lib/python3.6/site-pack
ages/matplotlib/pyplot.py", line 253, in show
    return _show(*args, **kw)
  File "/Users/gordio/Development/python/sk-numbers/venv/lib/python3.6/site-pack
ages/itermplot/__init__.py", line 131, in show
    figmanager.show()
  File "/Users/gordio/Development/python/sk-numbers/venv/lib/python3.6/site-pack
ages/itermplot/__init__.py", line 275, in show
    imgcat(data.getbuffer(), fn)
  File "/Users/gordio/Development/python/sk-numbers/venv/lib/python3.6/site-pack
ages/itermplot/__init__.py", line 115, in imgcat
    sys.stdout.write(buf)
  File "/Users/gordio/Development/python/sk-numbers/venv/lib/python3.6/site-pack
ages/bpython/curtsiesfrontend/coderunner.py", line 213, in write
    self.on_write(s, *args, **kwargs)
  File "/Users/gordio/Development/python/sk-numbers/venv/lib/python3.6/site-pack
ages/bpython/curtsiesfrontend/repl.py", line 1128, in send_to_stdout
    lines = output.split('\n')
TypeError: a bytes-like object is required, not 'str'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions