Created
September 25, 2025 20:11
-
-
Save azat/5ddc777c586bf297e27070d2429d871a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
$ python /tmp/clickhouse-exception.py | |
(0, '!#Vf5ABBlu!?8He&[nGr') | |
(0, '\\4(?%F5=>i,2l$?h<@!$') | |
(0, ':225JvK(tIr>!:*#t\\cD') | |
(0, 'E93AuwfS%QL~<NYr(&!M') | |
(0, 'r}e\\ K;8_w$x&fu [ht"') | |
(0, 'I\\x Kicp;N@okI?*J23 ') | |
(0, "ml{pd'|O>RX14@][H )]") | |
(0, 'S"Rj"_c\'".L,MB#9f)\'M') | |
(0, "'$ltY~+FpQ<=OA_^Edt+") | |
(0, 'C/ful*(v;t9xl"HYWa\\I') | |
(0, 'lCV0(I0luNqChD_E$mn%') | |
(0, '|@mnO:rB7rM@\\v94et2?') | |
(0, "Oq'dFe<5E^EOcuZVO EG") | |
(0, 'UORTDB,H9gOe 3(2J+V)') | |
(0, 'M YSC3jDRK{[\\3N!TxM,') | |
(0, 'G/pr`}5CdlK^z.OOcb{=') | |
(0, '77AGO^{>k[Zjj,G$;4-O') | |
(0, '\'E{ed:rL%[")>]&* \'XE') | |
(0, "[X{<Yuv]#l'z}|QR#7bl") | |
(0, '~ps9kIh\\7O-m@S0UDQ>_') | |
(0, 'yKD;t0CF)TnqR!Qum@Y(') | |
(0, '9VvlTNQ[PAbF`>E~>$2*') | |
(0, '$w32uH5&O;nJ^[CLs)Xo') | |
(0, '5>EQY7(ngy.{&.b@Ps}g') | |
(0, "X'8VrJ^@lc+<=xylw^6Q") | |
(0, 'E(>(M0%D2[,sVa-f/aqr') | |
(0, '5wU7KOZD|b&I=L;uQBZm') | |
(0, "oc;Hmvz)t(iK$5{'+BdF") | |
(0, 'lf{q!+,?FoQHPPgPc/4H') | |
(0, '4A0Q/q#~o&;2OC]wHAz-') | |
(0, 'K1yftcKg;!SqN)=:/|!o') | |
(0, '{[*5;0fJP<?Fy{rM7ID/') | |
(0, 'Hj)4OZO(7@!J5E2S$Mvu') | |
(0, 'yxqm(u<}FIB##nQmhW"b') | |
(0, 'O89J#q[8Wl#;KB`l#6.@') | |
(0, "giZ+'RIUZ897mg+N\\T]P") | |
(0, "B'@cUKkev7cAzs=*7nm(") | |
(0, 'uUP;`*"he?lsOU[_`\'Ia') | |
(0, 'E/5G5UHJ(|\\hsuD2KXy.') | |
(0, 'xxTh={@rPI;g$#^RC$|%') | |
(0, 'yiaIcSooZZ;4=@0#1V7*') | |
(0, "d8S\\j)d~dCubvg^'j'@|") | |
(0, '"m9EHDd@@%P7)T*=dzdg') | |
(0, 'ZF%6?YU H64#3?%BEsu%') | |
(0, '2B:a_T;)wA-}nRjvX+z9') | |
(0, 'DLd70/l7X\\gNFZ]7I$Xs') | |
(0, 'V 0Y3[JPylrnYh>?v4_U') | |
(0, 'sO7AjH(8-0["x?}_@,p"') | |
(0, "LQ@M5lG`'@]Bji]ik8[i") | |
(0, "fy;H}|;'.3VjV9lblk0P") | |
Traceback (most recent call last): | |
File "/tmp/clickhouse-exception.py", line 6, in <module> | |
for row in i: | |
^ | |
File "/home/azat/.local/lib/python3.13/site-packages/clickhouse_driver/client.py", line 221, in iter_receive_result | |
for rows in result: | |
^^^^^^ | |
File "/home/azat/.local/lib/python3.13/site-packages/clickhouse_driver/result.py", line 114, in __next__ | |
packet = next(self.packet_generator) | |
File "/home/azat/.local/lib/python3.13/site-packages/clickhouse_driver/client.py", line 228, in packet_generator | |
packet = self.receive_packet() | |
File "/home/azat/.local/lib/python3.13/site-packages/clickhouse_driver/client.py", line 245, in receive_packet | |
raise packet.exception | |
clickhouse_driver.errors.ServerException: Code: 395. | |
DB::Exception: There was an error in the stream!: while executing 'FUNCTION throwIf(equals(__table1.number, 50_UInt8) :: 3, 'There was an error in the stream!'_String :: 2) -> throwIf(equals(__table1.number, 50_UInt8), 'There was an error in the stream!'_String) UInt8 : 0'. Stack trace: | |
0. /src/ch/clickhouse/contrib/llvm-project/libcxx/include/__exception/exception.h:113: Poco::Exception::Exception(String const&, int) @ 0x000000001f005ef9 | |
1. /src/ch/clickhouse/src/Common/Exception.cpp:128: DB::Exception::Exception(DB::Exception::MessageMasked&&, int, bool) @ 0x000000000f52cba2 | |
2. /src/ch/clickhouse/src/Common/Exception.h:122: DB::Exception::Exception(String const&, int, String, bool) @ 0x000000000e14c7d1 | |
3. /src/ch/clickhouse/src/Common/Exception.h:135: DB::Exception::createRuntime(int, String const&) @ 0x000000000e14c727 | |
4. /src/ch/clickhouse/src/Functions/throwIf.cpp:150: DB::(anonymous namespace)::FunctionThrowIf::executeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x000000000e14ad61 | |
5. /src/ch/clickhouse/src/Functions/IFunctionAdaptors.cpp:10: DB::FunctionToExecutableFunctionAdaptor::executeImpl(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long) const @ 0x000000001359533f | |
6. /src/ch/clickhouse/src/Functions/IFunction.cpp:352: DB::IExecutableFunction::executeWithoutLowCardinalityColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000001358e430 | |
7. /src/ch/clickhouse/src/Functions/IFunction.cpp:419: DB::IExecutableFunction::executeWithoutSparseColumns(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x000000001358f61b | |
8. /src/ch/clickhouse/src/Functions/IFunction.cpp:497: DB::IExecutableFunction::execute(std::vector<DB::ColumnWithTypeAndName, std::allocator<DB::ColumnWithTypeAndName>> const&, std::shared_ptr<DB::IDataType const> const&, unsigned long, bool) const @ 0x0000000013590671 | |
9. /src/ch/clickhouse/src/Interpreters/ExpressionActions.cpp:670: DB::ExpressionActions::execute(DB::Block&, unsigned long&, bool, bool) const @ 0x0000000015502658 | |
10. /src/ch/clickhouse/src/Processors/Transforms/ExpressionTransform.cpp:26: DB::ExpressionTransform::transform(DB::Chunk&) @ 0x00000000195a022a | |
11. /src/ch/clickhouse/src/Processors/ISimpleTransform.h:33: DB::ISimpleTransform::transform(DB::Chunk&, DB::Chunk&) @ 0x0000000012351d16 | |
12. /src/ch/clickhouse/src/Processors/ISimpleTransform.cpp:98: DB::ISimpleTransform::work() @ 0x000000001930c40e | |
13. /src/ch/clickhouse/src/Processors/Executors/ExecutionThreadContext.cpp:53: DB::ExecutionThreadContext::executeTask() @ 0x00000000193292a0 | |
14. /src/ch/clickhouse/src/Processors/Executors/PipelineExecutor.cpp:351: DB::PipelineExecutor::executeStepImpl(unsigned long, DB::IAcquiredSlot*, std::atomic<bool>*) @ 0x000000001931c44e | |
15. /src/ch/clickhouse/src/Processors/Executors/PipelineExecutor.cpp:279: DB::PipelineExecutor::executeImpl(unsigned long, bool) @ 0x000000001931bc5d | |
16. /src/ch/clickhouse/src/Processors/Executors/PipelineExecutor.cpp:136: DB::PipelineExecutor::execute(unsigned long, bool) @ 0x000000001931b8b1 | |
17. /src/ch/clickhouse/src/Processors/Executors/PullingAsyncPipelineExecutor.cpp:76: void std::__function::__policy_invoker<void ()>::__call_impl[abi:ne190107]<std::__function::__default_alloc_func<ThreadFromGlobalPoolImpl<true, true>::ThreadFromGlobalPoolImpl<DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0>(DB::PullingAsyncPipelineExecutor::pull(DB::Chunk&, unsigned long)::$_0&&)::'lambda'(), void ()>>(std::__function::__policy_storage const*) @ 0x0000000019330c1c | |
18. /src/ch/clickhouse/contrib/llvm-project/libcxx/include/__functional/function.h:716: ? @ 0x000000000f664ed8 | |
19. /src/ch/clickhouse/contrib/llvm-project/libcxx/include/__type_traits/invoke.h:117: void* std::__thread_proxy[abi:ne190107]<std::tuple<std::unique_ptr<std::__thread_struct, std::default_delete<std::__thread_struct>>, void (ThreadPoolImpl<std::thread>::ThreadFromThreadPool::*)(), ThreadPoolImpl<std::thread>::ThreadFromThreadPool*>>(void*) @ 0x000000000f66a882 | |
20. /usr/src/debug/glibc/glibc/nptl/pthread_create.c:448: start_thread @ 0x00000000000969cb | |
21. ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78: __clone3 @ 0x000000000011aa0c |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import clickhouse_driver | |
c = clickhouse_driver.Client(host='127.1') | |
i = c.execute_iter("select throwIf(number = 50, 'There was an error in the stream!') AS _, randomPrintableASCII(20) AS str from system.numbers limit 30000 SETTINGS max_block_size=1") | |
for row in i: | |
print(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment