Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"No module named" error in Apache Storm Python Bolt

I am getting the following error message when I try to locally run a Storm topology with a single bolt implemented in python. I am doing everything like in the example of WordCountTopology in storm-starter kit but it fails to load the modules like matplotlib that are required in my python bolt. Any help or guidance would be appreciated.

I am using Anaconda on Windows machine, if that helps.

12970 [Thread-21-divide] ERROR backtype.storm.daemon.executor - 
java.lang.RuntimeException: Error when launching multilang subprocess
Traceback (most recent call last):
  File "pythonBolt.py", line 4, in <module>
    from matplotlib import mlab
ImportError: No module named matplotlib

    at backtype.storm.utils.ShellProcess.launch(ShellProcess.java:66) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    at backtype.storm.task.ShellBolt.prepare(ShellBolt.java:117) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    at backtype.storm.daemon.executor$fn__8077$fn__8090.invoke(executor.clj:746) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    at backtype.storm.util$async_loop$fn__543.invoke(util.clj:473) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    at clojure.lang.AFn.run(AFn.java:22) [clojure-1.6.0.jar:na]
    at java.lang.Thread.run(Unknown Source) [na:1.8.0_31]
Caused by: java.io.IOException: Die Pipe wurde beendet
    at java.io.FileOutputStream.writeBytes(Native Method) ~[na:1.8.0_31]
    at java.io.FileOutputStream.write(Unknown Source) ~[na:1.8.0_31]
    at java.io.BufferedOutputStream.flushBuffer(Unknown Source) ~[na:1.8.0_31]
    at java.io.BufferedOutputStream.flush(Unknown Source) ~[na:1.8.0_31]
    at java.io.DataOutputStream.flush(Unknown Source) ~[na:1.8.0_31]
    at backtype.storm.multilang.JsonSerializer.writeString(JsonSerializer.java:96) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    at backtype.storm.multilang.JsonSerializer.writeMessage(JsonSerializer.java:89) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    at backtype.storm.multilang.JsonSerializer.connect(JsonSerializer.java:61) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    at backtype.storm.utils.ShellProcess.launch(ShellProcess.java:64) ~[storm-core-0.11.0-SNAPSHOT.jar:0.11.0-SNAPSHOT]
    ... 5 common frames omitted
like image 690
Erol Avatar asked May 12 '26 11:05

Erol


1 Answers

Are you using python virtual enviorments? In any case you need to install matplotlib, you can do that with running pip install matplotlib

like image 94
lapinkoira Avatar answered May 14 '26 00:05

lapinkoira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!