<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Python on DevTrace — 글로벌 개발 에러 트러블슈팅</title><link>https://tokkabi.com/tags/python/</link><description>Recent content in Python on DevTrace — 글로벌 개발 에러 트러블슈팅</description><generator>Hugo -- 0.125.0</generator><language>ko</language><lastBuildDate>Fri, 31 Jul 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tokkabi.com/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Python 크래시 로그 남기기 — 원격 서버에서 stderr 리다이렉션</title><link>https://tokkabi.com/posts/how-to-log-a-python-crash/</link><pubDate>Fri, 31 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/how-to-log-a-python-crash/</guid><description>원격 라즈베리 파이에서 실행 중인 Python 스크립트가 몇 시간 뒤 크래시될 때 오류 메시지를 파일로 남기는 방법을 다룹니다. 셸 리다이렉션(&amp;gt;&amp;gt; file 2&amp;gt;&amp;amp;1), logging.exception, sys.exc_info() 기반 크래시 로그 작성까지 단계별로 정리합니다.</description></item><item><title>Python concurrent.futures Executor.map: 하나의 작업이 예외를 던지면 나머지 결과가 사라지는 문제</title><link>https://tokkabi.com/posts/concurrentfutures-executormap-cancels-other-futures-when-one/</link><pubDate>Sat, 25 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/concurrentfutures-executormap-cancels-other-futures-when-one/</guid><description>Python의 concurrent.futures.Executor.map은 병렬 작업 중 하나가 예외를 던지면 결과 반복자가 종료되어 나머지 작업의 결과를 얻을 수 없습니다. 내장 map과 다른 동작입니다. 근본 원인과 회피 방법, 공식 수정(3.16)까지 정리합니다.</description></item><item><title>프로그램 종료 없이 전체 Python 예외 traceback 출력하기 — print_exc()의 함정과 print_exception() 활용</title><link>https://tokkabi.com/posts/catch-and-print-full-python-exception-traceback-without-halt/</link><pubDate>Wed, 15 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/catch-and-print-full-python-exception-traceback-without-halt/</guid><description>Python에서 try/except 블록을 사용하면서도 프로그램을 종료하지 않고 전체 예외 트레이스백(traceback)을 출력하는 방법을 다룹니다. traceback.print_exc() 사용 시 발생할 수 있는 함정과 sys.exc_info() 캐싱, print_exception()을 통한 원본 트레이스백 출력, 순환 참조(circular reference) 방지까지 실용적으로 설명합니다.</description></item><item><title>Python에서 프로그램 종료 없이 전체 예외 트레이스백(traceback) 출력하는 방법</title><link>https://tokkabi.com/posts/python-exception-traceback-print-without-exit/</link><pubDate>Mon, 13 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/python-exception-traceback-print-without-exit/</guid><description>Python의 try/except 블록 안에서 프로그램을 종료하지 않고도 전체 예외 트레이스백을 출력하는 방법을 다룹니다. traceback.print_exc()가 예외 체인에서 마지막 예외만 출력하는 함정과, sys.exc_info()를 캐시해 원본 예외를 보존하는 해결책을 설명합니다.</description></item><item><title>pytest에서 예외 발생을 올바르게 검증하는 방법 (pytest.raises)</title><link>https://tokkabi.com/posts/pytest-exception-assert-raises/</link><pubDate>Sat, 11 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/pytest-exception-assert-raises/</guid><description>pytest에서 예외 발생을 검증하는 올바른 방법은 pytest.raises를 사용하는 것입니다. try/except와 pytest.fail을 사용하면 traceback이 제대로 출력되지 않아 디버깅이 어렵습니다. pytest.raises 컨텍스트 매니저를 활용하면 예외 발생 여부와 예외 정보를 깔끔하게 확인할 수 있습니다.</description></item><item><title>Python에서 traceback 없이 프로그램 깔끔하게 종료하기 — sys.exit()와 예외 처리</title><link>https://tokkabi.com/posts/how-to-exit-from-python-without-traceback/</link><pubDate>Thu, 09 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/how-to-exit-from-python-without-traceback/</guid><description>Python 프로그램 종료 시 traceback 덤프가 화면에 출력되는 문제를 해결하는 방법을 다룹니다. KeyboardInterrupt와 Exception을 try/except로 잡고 traceback.print_exc() 후 sys.exit(0)을 호출하는 패턴을 소개합니다.</description></item><item><title>fatal error: Python.h: No such file or directory 해결</title><link>https://tokkabi.com/posts/fatal-error-pythonh-no-such-file-or-directory/</link><pubDate>Tue, 07 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/fatal-error-pythonh-no-such-file-or-directory/</guid><description>Python C 확장 모듈을 컴파일할 때 발생하는 &amp;#39;Python.h: No such file or directory&amp;#39; 오류는 Python 개발 헤더 파일이 설치되지 않았거나 컴파일러가 해당 경로를 찾지 못해 발생합니다. python-dev 패키지 설치와 gcc -I 옵션 지정으로 해결하는 방법을 단계별로 설명합니다.</description></item><item><title>파이썬에서 예외(Exception)를 출력하는 방법 정리</title><link>https://tokkabi.com/posts/how-do-i-print-an-exception-in-python/</link><pubDate>Sun, 05 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/how-do-i-print-an-exception-in-python/</guid><description>파이썬에서 예외를 출력하는 방법을 정리했습니다. except 블록 안에서 예외 객체를 print(e)로 출력하는 방법, traceback 모듈을 활용한 스택 트레이스 출력, logging으로 예외를 남기는 방법을 코드와 함께 다룹니다.</description></item><item><title>Python 2 UnicodeEncodeError: 'ascii' codec can't encode character — str() 대신 encode() 사용하기</title><link>https://tokkabi.com/posts/python2-ascii-unicodeencodeerror-str-vs-encode/</link><pubDate>Fri, 03 Jul 2026 00:00:00 +0000</pubDate><guid>https://tokkabi.com/posts/python2-ascii-unicodeencodeerror-str-vs-encode/</guid><description>Python 2에서 BeautifulSoup으로 웹 페이지를 파싱하다 &amp;#39;ascii&amp;#39; codec can&amp;#39;t encode character 에러가 발생하는 문제를 다룹니다. 원인은 유니코드 문자열을 str()로 ASCII에 강제 인코딩하려 하기 때문이며, .encode(&amp;#39;utf-8&amp;#39;)로 명시적 인코딩하거나 전체를 유니코드로 처리하면 해결됩니다.</description></item></channel></rss>