Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8387379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:11:38+00:00 2026-06-09T18:11:38+00:00

The Python standard library and other libraries I use (e.g. PyQt) sometimes use exceptions

  • 0

The Python standard library and other libraries I use (e.g. PyQt) sometimes use exceptions for non-error conditions. Look at the following except of the function os.get_exec_path(). It uses multiple try statements to catch exceptions that are thrown while trying to find some environment data.

try:
    path_list = env.get('PATH')
except TypeError:
    path_list = None

if supports_bytes_environ:
    try:
        path_listb = env[b'PATH']
    except (KeyError, TypeError):
        pass
    else:
        if path_list is not None:
            raise ValueError(
                "env cannot contain 'PATH' and b'PATH' keys")
        path_list = path_listb

    if path_list is not None and isinstance(path_list, bytes):
        path_list = fsdecode(path_list)

These exceptions do not signify an error and are thrown under normal conditions. When using exception breakpoints for one of these exceptions, the debugger will also break in these library functions.

Is there a way in PyCharm or in Python in general to have the debugger not break on exceptions that are thrown and caught inside a library without any involvement of my code?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:11:40+00:00Added an answer on June 9, 2026 at 6:11 pm

    This feature is not implemented yet, you can vote for it:

    • add ability to break (add breakpoint) on exceptions only for my files
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in a situation where importing non-standard python libraries is not suitable. Is
I use the Python standard library pwd module on GNU+Linux, but now I try
I'm attempting to make a python package of the following hierarchy: \standard \__init__.py \text.txt
Python's standard library has modules for configuration file parsing ( configparser ), environment variable
Is there python function in standard library like def cond(condition, true, false): if condition:
I am attempting to use the python-daemon library which seemed to me to be
I depend heavily on Python's standard library , both for useful data structures and
Python has a standard library module ftplib to run FTP communications. It has two
Many python libraries, even recently written ones, use httplib2 or the socket interface to
Is there a function in the Python standard library to reproduce Python's name mangling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.