Unable to convert Float
bmarsh9 opened this issue · 3 comments
Unable to convert the value to float. I added a try and except around it to fix it. For your awareness.
Traceback (most recent call last): File "/opt/spamscope/venv/local/lib/python2.7/site-packages/pystorm/component.py", line 488, in run self._run() File "/opt/spamscope/venv/local/lib/python2.7/site-packages/pystorm/bolt.py", line 197, in _run self.process(tup) File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/bolts/raw_mail.py", line 50, in process p(self.conf[p.__name__], raw_mail, mail_type, results) File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/post_processing.py", line 93, in spamassassin results["spamassassin"] = spamassassin[mail_type](raw_mail) File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/spamassassin_analysis.py", line 90, in report_from_file return obj_report(mail) File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/spamassassin_analysis.py", line 56, in obj_report details = convert_ascii2json(t) File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/spamassassin_analysis.py", line 141, in convert_ascii2json "pts": float(row[0]), ValueError: could not convert string to float: [SPF
Can you give me all traceback?
I can see the last part ValueError: could not convert string to float: [SPF....
sorry did not see your response. Here is the full traceback it gives:
> Traceback (most recent call last):
File "/opt/spamscope/venv/local/lib/python2.7/site-packages/pystorm/component.py", line 488, in run
self._run()
File "/opt/spamscope/venv/local/lib/python2.7/site-packages/pystorm/bolt.py", line 197, in _run
self.process(tup)
File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/bolts/raw_mail.py", line 50, in process
p(self.conf[p.__name__], raw_mail, mail_type, results)
File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/post_processing.py", line 93, in spamassassin
results["spamassassin"] = spamassassin[mail_type](raw_mail)
File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/spamassassin_analysis.py", line 90, in report_from_file
return obj_report(mail)
File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/spamassassin_analysis.py", line 56, in obj_report
details = convert_ascii2json(t)
File "/var/lib/storm/supervisor/stormdist/spamscope_debug-1-1539177259/resources/modules/mails/spamassassin_analysis.py", line 141, in convert_ascii2json
"pts": float(row[0]),
ValueError: could not convert string to float: [SPF
at org.apache.storm.task.ShellBolt.handleError(ShellBolt.java:227) [storm-core-1.2.1.jar:1.2.1]
at org.apache.storm.task.ShellBolt.access$1100(ShellBolt.java:72) [storm-core-1.2.1.jar:1.2.1]
at org.apache.storm.task.ShellBolt$BoltReaderRunnable.run(ShellBolt.java:348) [storm-core-1.2.1.jar:1.2.1]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
2018-10-12 12:49:30.963 o.a.s.t.ShellBolt Thread-33 [ERROR] Halting process: ShellBolt died. Command: [/opt/spamscope/venv//bin/streamparse_run, -s json bolts.raw_mail.RawMai$
java.lang.RuntimeException: org.apache.storm.multilang.NoOutputException: Pipe to subprocess seems to be broken! No output read.
Serializer Exception:
at org.apache.storm.utils.ShellProcess.readShellMsg(ShellProcess.java:127) ~[storm-core-1.2.1.jar:1.2.1]
at org.apache.storm.task.ShellBolt$BoltReaderRunnable.run(ShellBolt.java:330) [storm-core-1.2.1.jar:1.2.1]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
2018-10-12 12:49:30.963 o.a.s.d.executor Thread-33 [ERROR]
java.lang.RuntimeException: org.apache.storm.multilang.NoOutputException: Pipe to subprocess seems to be broken! No output read.
Serializer Exception:
Hi @bm1391,
to manage the issue correctly please use the new issue template that I uploaded.
I'm closing this issue because I can't solve it without all data.