Skip to content

Something about boto3 crashes bpython #653

@RichardBronosky

Description

@RichardBronosky

I don't know enough to debug this further. I'm hoping someone can help because I really rely on bpython to explore and develop using libraries I don't know.

Steps to reproduce:

$ pip install boto3 # you don't even need a ~/.aws/credentials file
$ bpython
bpython version 0.16 on top of Python 2.7.12 /usr/local/opt/python/bin/python2.7
>>> import boto3
>>> s3=boto3.resource('s3')
>>> obj=s3.Object('bucket','key') # this can literally be those 2 strings
>>> obj.get(
Traceback (most recent call last):
  File "/usr/local/bin/bpython", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/bpython/curtsies.py", line 190, in main
    exit_value = repl.mainloop()
  File "/usr/local/lib/python2.7/site-packages/bpython/curtsies.py", line 125, in mainloop
    self.process_event_and_paint(e)
  File "/usr/local/lib/python2.7/site-packages/bpython/curtsies.py", line 99, in process_event_and_paint
    array, cursor_pos = self.paint()
  File "/usr/local/lib/python2.7/site-packages/bpython/curtsiesfrontend/repl.py", line 1447, in paint
    if self.matches_iter.completer else None)
  File "/usr/local/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 179, in paint_infobox
    if docstring else [])
  File "/usr/local/lib/python2.7/site-packages/bpython/curtsiesfrontend/replpainter.py", line 167, in formatted_docstring
    for line in docstring.split('\n')), [])
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2822: ordinal not in range(128)

That crash happens as soon as you strike the ( key. You don't have to hit enter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions