bitmessage --curses crashes over UTF / Unicode #1345

Open
opened 2018-09-18 15:34:30 +02:00 by dimyme · 2 comments
dimyme commented 2018-09-18 15:34:30 +02:00 (Migrated from github.com)

the curses mode could use a lil fixing ... then it works great. happened after "reply-to-BM"

I ran v.0.6 tip



2018-09-18  15:29:45,416 - CRITICAL - Unhandled exception Traceback (most recent call last):   File "bitmessagemain.py", line 507, in <module>     main()

  File "bitmessagemain.py", line 503, in main    mainprogram.start()

  File "bitmessagemain.py", line 398, in start    bitmessagecurses.runwrapper()

  File "/z/src/bitmessagecurses/__init__.py", line 1004, in runwrapper    curses.wrapper(run)

  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper    return func(stdscr, *args, **kwds)

  File "/z/src/bitmessagecurses/__init__.py", line 1049, in run    handlech(stdscr.getch(), stdscr)

  File "/z/src/bitmessagecurses/__init__.py", line 334, in handlech    sendMessage(fromaddr, toaddr, ischan, subject, body, True)

  File "/z/src/bitmessagecurses/__init__.py", line 735, in sendMessage     r, t = d.inputbox("Message body", 10, 80, init=body)

  File "/usr/lib/python2.7/site-packages/dialog.py", line 2788, in inputbox     kwargs, strip_xdialog_newline=True, raw_help=True)

  File "/usr/lib/python2.7/site-packages/dialog.py", line 1748, in _widget_with_string_output
    code, output = self._perform(args, **kwargs)

  File "/usr/lib/python2.7/site-packages/dialog.py", line 1540, in _perform     **kwargs)

  File "/usr/lib/python2.7/site-packages/dialog.py", line 1301, in _call_program     cmdargs = self.dash_escape_nf(cmdargs)

  File "/usr/lib/python2.7/site-packages/dialog.py", line 1095, in dash_escape_nf     return _dash_escape_nf(args)

  File "/usr/lib/python2.7/site-packages/dialog.py", line 323, in _dash_escape_nf     l = _dash_escape(args[1:])

  File "/usr/lib/python2.7/site-packages/dialog.py", line 306, in _dash_escape     if arg.startswith("--"):

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 134: ordinal not in range(128)

I hate markdown btw

### the curses mode could use a lil fixing ... then it works great. happened after "reply-to-BM" I ran v.0.6 tip ``` 2018-09-18 15:29:45,416 - CRITICAL - Unhandled exception Traceback (most recent call last): File "bitmessagemain.py", line 507, in <module> main() File "bitmessagemain.py", line 503, in main mainprogram.start() File "bitmessagemain.py", line 398, in start bitmessagecurses.runwrapper() File "/z/src/bitmessagecurses/__init__.py", line 1004, in runwrapper curses.wrapper(run) File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper return func(stdscr, *args, **kwds) File "/z/src/bitmessagecurses/__init__.py", line 1049, in run handlech(stdscr.getch(), stdscr) File "/z/src/bitmessagecurses/__init__.py", line 334, in handlech sendMessage(fromaddr, toaddr, ischan, subject, body, True) File "/z/src/bitmessagecurses/__init__.py", line 735, in sendMessage r, t = d.inputbox("Message body", 10, 80, init=body) File "/usr/lib/python2.7/site-packages/dialog.py", line 2788, in inputbox kwargs, strip_xdialog_newline=True, raw_help=True) File "/usr/lib/python2.7/site-packages/dialog.py", line 1748, in _widget_with_string_output code, output = self._perform(args, **kwargs) File "/usr/lib/python2.7/site-packages/dialog.py", line 1540, in _perform **kwargs) File "/usr/lib/python2.7/site-packages/dialog.py", line 1301, in _call_program cmdargs = self.dash_escape_nf(cmdargs) File "/usr/lib/python2.7/site-packages/dialog.py", line 1095, in dash_escape_nf return _dash_escape_nf(args) File "/usr/lib/python2.7/site-packages/dialog.py", line 323, in _dash_escape_nf l = _dash_escape(args[1:]) File "/usr/lib/python2.7/site-packages/dialog.py", line 306, in _dash_escape if arg.startswith("--"): UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 134: ordinal not in range(128) ``` I hate markdown btw
dimyme commented 2018-09-19 17:48:54 +02:00 (Migrated from github.com)

my latest curses init.py is mostly fixed . very useable now ! see:

https://github.com/dimyme/PyBitmessage/blob/v0.6/src/bitmessagecurses/modding/init.py

my latest curses __init__.py is mostly fixed . very useable now ! see: https://github.com/dimyme/PyBitmessage/blob/v0.6/src/bitmessagecurses/modding/__init__.py
dimyme commented 2018-09-20 11:59:02 +02:00 (Migrated from github.com)

but send BM does not yet work, but easy to fix I guess

but send BM does not yet work, but easy to fix I guess
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-08-21#1345
No description provided.