Created
September 25, 2017 13:43
-
-
Save komorin0521/46ba44b23ff11ec18ea3a5b575ad5f6d to your computer and use it in GitHub Desktop.
pythonにおけるstackoverflow問題(Cannot recover from stack overflow) ref: http://qiita.com/komorin0521/items/9f2ea1e2a37fd7f13fe2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fatal Python error: Cannot recover from stack overflow. | |
Current thread 0x00007f434f650700 (most recent call first): | |
File "***.py", line 4 in ... | |
File "***.py", line 7 in ... | |
File "***.py", line 7 in ... | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hoge() | |
try: | |
(正常処理) | |
except Exception as e: | |
(eの表示など) | |
hoge() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hoge() | |
try: | |
(正常処理) | |
except Exception as e: | |
(eの表示など) | |
def main(): | |
try: | |
while True: | |
hoge() | |
except Exception as e: | |
(eの表示など) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
print(sys.getrecursionlimit()) # 再起呼び出しの最大値を表示 -> 1000 | |
sys.setrecursionlimit(20000) # 再起呼び出しの最大数をセット |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment