Python error when debugging

Completed

At the top of every debugging session console output is:

Error during pretty printers setup: Error while executing Python code.
Some features and performance optimizations will not be available.

python
>>>>>>>Traceback (most recent call last):
File "<string>", line 3, in <module>
ModuleNotFoundError: No module named 'default'
Error while executing Python code.

Why is this happening and how can I fix it?

Linux 4.9.8-1-ARCH #1 SMP PREEMPT x86_64 GNU/Linux, CLion 2016.3.3, GDB 7.12.1, clang version 3.9.1.

0
6 comments

Hi, Spencer.

Sorry for the inconvenience! Could you please enable debug logging by entering `#com.jetbrains.cidr.execution.debugger` into Help | Debug Log Settings, reproduce the problem and send us idea.log (Help | Show Log in Finder) to clion-support at jetbrains.com. Do not forget to disable debug logging after that.

0
Avatar
Permanently deleted user

I think its about incompatibility between ArchLinux and the Jetbrains IDEs, because I'm also using Arch and also running into this problem. Probably the packages (like Python?) on ArchLinux are just too up-to-date.

0
Avatar
Permanently deleted user

```

2017-03-13 04:05:58,752 [182970309] INFO - brains.cidr.execution.debugger - Debugger started
2017-03-13 04:05:59,172 [182970729] WARN - brains.cidr.execution.debugger - >python
import sys
sys.path.insert(0, "/opt/clion/bin/gdb/renderers")
from default.printers import register_default_printers
register_default_printers(None)
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers(None)
end
2017-03-13 04:05:59,176 [182970733] WARN - brains.cidr.execution.debugger - <^error,msg="Error while executing Python code."
2017-03-13 04:05:59,176 [182970733] INFO - brains.cidr.execution.debugger - Error during pretty printers setup: Error while executing Python code.
Some features and performance optimizations will not be available.

python
>>>>>>>Traceback (most recent call last):
File "<string>", line 3, in <module>
ModuleNotFoundError: No module named 'default'
Error while executing Python code.

com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver$GDBCommandException: Error while executing Python code.
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.a(GDBDriver.java:2180)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.a(GDBDriver.java:2172)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.sendRequestAndWaitFor(GDBDriver.java:2085)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.sendRequestAndWaitForDone(GDBDriver.java:2064)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.c(GDBDriver.java:398)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.access$1600(GDBDriver.java:53)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver$5.run(GDBDriver.java:441)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.a(GDBDriver.java:2565)
at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:265)
at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:262)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$0(QueueProcessor.java:106)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:223)
at com.intellij.util.concurrency.QueueProcessor.lambda$wrappingProcessor$1(QueueProcessor.java:106)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$2(QueueProcessor.java:203)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:223)
at com.intellij.util.concurrency.QueueProcessor.lambda$startProcessing$3(QueueProcessor.java:203)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-03-13 04:05:59,548 [182971105] INFO - brains.cidr.execution.debugger - Debugger exited with code 137
2017-03-13 04:09:07,657 [183159214] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #com.jetbrains.cidr.execution.debugger
2017-03-13 04:09:12,381 [183163938] INFO - lij.diagnostic.DebugLogManager - Set DEBUG for the following categories: #com.jetbrains.cidr.execution.debugger
2017-03-13 04:09:14,794 [183166351] INFO - #com.jetbrains.cidr.cpp - Building: /usr/bin/cmake --build /somepath/cmake-build-debug --target StringTest -- -j 4
2017-03-13 04:09:15,042 [183166599] INFO - brains.cidr.execution.debugger - Debugger started
2017-03-13 04:09:15,074 [183166631] DEBUG - brains.cidr.execution.debugger - </usr/bin/gdb -interpreter=mi2

2017-03-13 04:09:15,156 [183166713] DEBUG - brains.cidr.execution.debugger - <=thread-group-added,id="i1"
2017-03-13 04:09:15,156 [183166713] DEBUG - brains.cidr.execution.debugger - <~"GNU gdb (GDB) 7.12.1\n"
2017-03-13 04:09:15,156 [183166713] DEBUG - brains.cidr.execution.debugger - <~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
2017-03-13 04:09:15,156 [183166713] DEBUG - brains.cidr.execution.debugger - <~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
2017-03-13 04:09:15,157 [183166714] DEBUG - brains.cidr.execution.debugger - <~"This GDB was configured as \"x86_64-pc-linux-gnu\".\nType \"show configuration\" for configuration details."
2017-03-13 04:09:15,157 [183166714] DEBUG - brains.cidr.execution.debugger - <~"\nFor bug reporting instructions, please see:\n"
2017-03-13 04:09:15,157 [183166714] DEBUG - brains.cidr.execution.debugger - <~"<http://www.gnu.org/software/gdb/bugs/>.\n"
2017-03-13 04:09:15,157 [183166714] DEBUG - brains.cidr.execution.debugger - <~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
2017-03-13 04:09:15,157 [183166714] DEBUG - brains.cidr.execution.debugger - <~"For help, type \"help\".\n"
2017-03-13 04:09:15,157 [183166714] DEBUG - brains.cidr.execution.debugger - <~"Type \"apropos word\" to search for commands related to \"word\".\n"
2017-03-13 04:09:15,158 [183166715] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,158 [183166715] DEBUG - brains.cidr.execution.debugger - >-gdb-set print elements 1000
2017-03-13 04:09:15,159 [183166716] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,159 [183166716] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,159 [183166716] DEBUG - brains.cidr.execution.debugger - >-gdb-set print repeats 0
2017-03-13 04:09:15,160 [183166717] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,160 [183166717] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,160 [183166717] DEBUG - brains.cidr.execution.debugger - >-gdb-set print object on
2017-03-13 04:09:15,162 [183166719] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,162 [183166719] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,162 [183166719] DEBUG - brains.cidr.execution.debugger - >info pretty-printer
2017-03-13 04:09:15,163 [183166720] DEBUG - brains.cidr.execution.debugger - <&"info pretty-printer\n"
2017-03-13 04:09:15,163 [183166720] DEBUG - brains.cidr.execution.debugger - <~"global pretty-printers:\n"
2017-03-13 04:09:15,164 [183166721] DEBUG - brains.cidr.execution.debugger - <~" builtin\n"
2017-03-13 04:09:15,164 [183166721] DEBUG - brains.cidr.execution.debugger - <~" mpx_bound128\n"
2017-03-13 04:09:15,164 [183166721] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,164 [183166721] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,164 [183166721] DEBUG - brains.cidr.execution.debugger - >python
import sys
sys.path.insert(0, "/opt/clion/bin/gdb/renderers")
from default.printers import register_default_printers
register_default_printers(None)
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers(None)
end
2017-03-13 04:09:15,165 [183166722] DEBUG - brains.cidr.execution.debugger - <&"python\n"
2017-03-13 04:09:15,165 [183166722] DEBUG - brains.cidr.execution.debugger - <~">"
2017-03-13 04:09:15,165 [183166722] DEBUG - brains.cidr.execution.debugger - <~">"
2017-03-13 04:09:15,165 [183166722] DEBUG - brains.cidr.execution.debugger - <~">"
2017-03-13 04:09:15,165 [183166722] DEBUG - brains.cidr.execution.debugger - <~">"
2017-03-13 04:09:15,166 [183166723] DEBUG - brains.cidr.execution.debugger - <~">"
2017-03-13 04:09:15,166 [183166723] DEBUG - brains.cidr.execution.debugger - <~">"
2017-03-13 04:09:15,166 [183166723] DEBUG - brains.cidr.execution.debugger - <~">"
2017-03-13 04:09:15,166 [183166723] DEBUG - brains.cidr.execution.debugger - <&"Traceback (most recent call last):\n"
2017-03-13 04:09:15,166 [183166723] DEBUG - brains.cidr.execution.debugger - <&" File \"<string>\", line 3, in <module>\n"
2017-03-13 04:09:15,166 [183166723] DEBUG - brains.cidr.execution.debugger - <&"ModuleNotFoundError: No module named 'default'\n"
2017-03-13 04:09:15,166 [183166723] DEBUG - brains.cidr.execution.debugger - <&"Error while executing Python code.\n"
2017-03-13 04:09:15,167 [183166724] DEBUG - brains.cidr.execution.debugger - <^error,msg="Error while executing Python code."
2017-03-13 04:09:15,167 [183166724] WARN - brains.cidr.execution.debugger - >python
import sys
sys.path.insert(0, "/opt/clion/bin/gdb/renderers")
from default.printers import register_default_printers
register_default_printers(None)
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers(None)
end
2017-03-13 04:09:15,167 [183166724] WARN - brains.cidr.execution.debugger - <^error,msg="Error while executing Python code."
2017-03-13 04:09:15,167 [183166724] INFO - brains.cidr.execution.debugger - Error during pretty printers setup: Error while executing Python code.
Some features and performance optimizations will not be available.

python
>>>>>>>Traceback (most recent call last):
File "<string>", line 3, in <module>
ModuleNotFoundError: No module named 'default'
Error while executing Python code.

com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver$GDBCommandException: Error while executing Python code.
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.a(GDBDriver.java:2180)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.a(GDBDriver.java:2172)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.sendRequestAndWaitFor(GDBDriver.java:2085)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.sendRequestAndWaitForDone(GDBDriver.java:2064)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.c(GDBDriver.java:398)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.access$1600(GDBDriver.java:53)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver$5.run(GDBDriver.java:441)
at com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver.a(GDBDriver.java:2565)
at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:265)
at com.intellij.util.concurrency.QueueProcessor$RunnableConsumer.consume(QueueProcessor.java:262)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$0(QueueProcessor.java:106)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:223)
at com.intellij.util.concurrency.QueueProcessor.lambda$wrappingProcessor$1(QueueProcessor.java:106)
at com.intellij.util.concurrency.QueueProcessor.lambda$null$2(QueueProcessor.java:203)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:223)
at com.intellij.util.concurrency.QueueProcessor.lambda$startProcessing$3(QueueProcessor.java:203)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2017-03-13 04:09:15,168 [183166725] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,168 [183166725] DEBUG - brains.cidr.execution.debugger - >-file-exec-and-symbols "/somepath/cmake-build-debug/StringTest"
2017-03-13 04:09:15,169 [183166726] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,169 [183166726] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,169 [183166726] DEBUG - brains.cidr.execution.debugger - >-break-insert -f "/somepath/first/String.hh:34"
2017-03-13 04:09:15,170 [183166727] DEBUG - brains.cidr.execution.debugger - <&"No line 34 in file \"/somepath/first/String.hh\".\n"
2017-03-13 04:09:15,171 [183166728] DEBUG - brains.cidr.execution.debugger - <^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="<PENDING>",pending="/somepath/first/String.hh:34",times="0",original-location="/somepath/first/String.hh:34"}
2017-03-13 04:09:15,171 [183166728] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,172 [183166729] DEBUG - brains.cidr.execution.debugger - >-interpreter-exec console "unset env PYTHONDONTWRITEBYTECODE"
2017-03-13 04:09:15,173 [183166730] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,173 [183166730] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,174 [183166731] DEBUG - brains.cidr.execution.debugger - >-inferior-tty-set "/dev/pts/0"
2017-03-13 04:09:15,174 [183166731] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,174 [183166731] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,176 [183166733] DEBUG - brains.cidr.execution.debugger - >-exec-arguments 1> '/dev/pts/27' 2> '/dev/pts/28'
2017-03-13 04:09:15,180 [183166737] DEBUG - brains.cidr.execution.debugger - <^done
2017-03-13 04:09:15,181 [183166738] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,181 [183166738] DEBUG - brains.cidr.execution.debugger - >-exec-run
2017-03-13 04:09:15,182 [183166739] DEBUG - brains.cidr.execution.debugger - <=thread-group-started,id="i1",pid="17879"
2017-03-13 04:09:15,186 [183166743] DEBUG - brains.cidr.execution.debugger - <=thread-created,id="1",group-id="i1"
2017-03-13 04:09:15,192 [183166749] DEBUG - brains.cidr.execution.debugger - <=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1"
2017-03-13 04:09:15,194 [183166751] DEBUG - brains.cidr.execution.debugger - <^running
2017-03-13 04:09:15,194 [183166751] DEBUG - brains.cidr.execution.debugger - <*running,thread-id="all"
2017-03-13 04:09:15,194 [183166751] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,197 [183166754] DEBUG - brains.cidr.execution.debugger - <=library-loaded,id="/usr/lib/libstdc++.so.6",target-name="/usr/lib/libstdc++.so.6",host-name="/usr/lib/libstdc++.so.6",symbols-loaded="0",thread-group="i1"
2017-03-13 04:09:15,198 [183166755] DEBUG - brains.cidr.execution.debugger - <=library-loaded,id="/usr/lib/libm.so.6",target-name="/usr/lib/libm.so.6",host-name="/usr/lib/libm.so.6",symbols-loaded="0",thread-group="i1"
2017-03-13 04:09:15,199 [183166756] DEBUG - brains.cidr.execution.debugger - <=library-loaded,id="/usr/lib/libgcc_s.so.1",target-name="/usr/lib/libgcc_s.so.1",host-name="/usr/lib/libgcc_s.so.1",symbols-loaded="0",thread-group="i1"
2017-03-13 04:09:15,200 [183166757] DEBUG - brains.cidr.execution.debugger - <=library-loaded,id="/usr/lib/libc.so.6",target-name="/usr/lib/libc.so.6",host-name="/usr/lib/libc.so.6",symbols-loaded="0",thread-group="i1"
2017-03-13 04:09:15,381 [183166938] DEBUG - brains.cidr.execution.debugger - <~"[Inferior 1 (process 17879) exited normally]\n"
2017-03-13 04:09:15,381 [183166938] DEBUG - brains.cidr.execution.debugger - <=thread-exited,id="1",group-id="i1"
2017-03-13 04:09:15,382 [183166939] DEBUG - brains.cidr.execution.debugger - <=thread-group-exited,id="i1",exit-code="0"
2017-03-13 04:09:15,382 [183166939] DEBUG - brains.cidr.execution.debugger - <*stopped,reason="exited-normally"
2017-03-13 04:09:15,382 [183166939] DEBUG - brains.cidr.execution.debugger - <(gdb)
2017-03-13 04:09:15,384 [183166941] DEBUG - brains.cidr.execution.debugger - >-gdb-exit
2017-03-13 04:09:15,389 [183166946] DEBUG - brains.cidr.execution.debugger - <^exit
2017-03-13 04:09:15,392 [183166949] INFO - brains.cidr.execution.debugger - Debugger exited with code 137
2017-03-13 04:09:15,392 [183166949] DEBUG - brains.cidr.execution.debugger - <[terminated]

```

0

@Axurez, the AUR packages clion-cmake, clion-gdb, clion-lldb, etc, can be installed to enable the built-in cmake, gdb, etc. I used the built in ones and now it works fine. If you don't have them installed it gives a "built-in GDB doesn't work on this system" error which isn't the most clear, because you just don't have it installed.

0

I still receive this error on Ubuntu 18.04.  Remote debugging works but the error messages are distracting:

Error during pretty printers setup: Error while executing Python code.

Some features and performance optimizations will not be available.

0

@Lee, it's https://youtrack.jetbrains.com/issue/CPP-14177, feel free to comment or upvote in order to get updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.

Also you can try using this workaround suggested by a user.

0

Please sign in to leave a comment.