Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Using sys.exit() with no arguments causes TypeError inside ptvsd #840

Closed
huguesv opened this issue Sep 25, 2018 · 0 comments
Closed

Using sys.exit() with no arguments causes TypeError inside ptvsd #840

huguesv opened this issue Sep 25, 2018 · 0 comments
Labels

Comments

@huguesv
Copy link
Contributor

huguesv commented Sep 25, 2018

Environment data

  • PTVSD version: 4.1.3
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6
  • Using VS Code or Visual Studio: VS

Actual behavior

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\ptvsd_launcher.py", line 119, in <module>
    
vspd.debug(filename, port_num, debug_id, debug_options, run_as)

  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\debugger.py", line 37, in debug
    
run(address, filename, *args, **kwargs)

  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_local.py", line 48, in run_file
    
run(argv, addr, **kwargs)

  File "c:\program files (x86)\microsoft visual studio\2017\community\common7\ide\extensions\microsoft\python\core\Packages\ptvsd\_local.py", line 101, in _run
    
daemon.exitcode = int(ex.code)

TypeError
: 
int() argument must be a string, a bytes-like object or a number, not 'NoneType'

Expected behavior

No error

Steps to reproduce:

  1. Debug this code:
sys.exit()

https://docs.python.org/3/library/sys.html#sys.exit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants