selectel / pyte

Simple VTXXX-compatible linux terminal emulator
http://pyte.readthedocs.org/
GNU Lesser General Public License v3.0
649 stars 101 forks source link

w3m crashes in pyte #126

Open ruapotato opened 5 years ago

ruapotato commented 5 years ago

When you use any key in w3m running through pyte I see the following crash:

Exception in thread Thread-204: News GmaSearch Images Maps Play YouTube News Gma
Traceback (most recent call last):      Web History | Settings | Sign in        
  File "/usr/lib64/python3.6/threading.py", line 916, in _bootstrap_inner       
    self.run()                      Goog                                    Goog
  File "/usr/lib64/python3.6/threading.py", line 864, in run                    
    self._target(*self._args, **self._kwargs)      [                            
  File "<string>", line 109, in bashScreenRef                                   
  File "/usr/lib/python3.6/site-packages/pyte/streams.py", line 392, in feedh][I
    super(ByteStream, self).feed(data)                                          
  File "/usr/lib/python3.6/site-packages/pyte/streams.py", line 196, in feedess 
    taking_plain_text = send(data[offset:offset + 1])                           
  File "/usr/lib/python3.6/site-packages/pyte/streams.py", line 323, in _parser_fsm                                                                             
    csi_dispatch[char](*params, private=True)                                   
TypeError: set_margins() got an unexpected keyword argument 'private' 

Posible fix: https://github.com/ruapotato/pyte/commit/2f91353a6e2b283a36a0e6dc037ec3a99e57ab2f

I also see a crash looking at config files on extream switches.
Possible workaground:
https://github.com/ruapotato/pyte/commit/b24f60dee53b6356b3c79cd95b2a1a4965b8c55b

superbobry commented 5 years ago

This is likely because your TERM is xterm* instead of vt220 or linux. Which TERM variable are you using?