Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"[Bug]" TypeError: ('sequence item 1: expected str instance, NoneType found', 'occurred at index 0') #3

Closed
jaegeral opened this issue Aug 23, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jaegeral
Copy link
Contributor

Describe the bug
Uploading a SID package gives me an error

(I am using https://github.com/LDO-CERT/mans_to_es/blob/refactoring_test/mans_to_es/mans_to_es.py)

2019-08-23 07:13:41,564 stateagentinspector: AAAAAAa subtype: fileWriteEvent
2019-08-23 07:14:17,043 Error parsing .mans
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
return list(itertools.starmap(args[0], args[1]))
File "/usr/local/bin/mans_to_es.py", line 758, in process_file
axis=1,
File "/home/a/venv3.6/lib/python3.6/site-packages/pandas/core/frame.py", line 6487, in apply
return op.get_result()
File "/home/a/venv3.6/lib/python3.6/site-packages/pandas/core/apply.py", line 151, in get_result
return self.apply_standard()
File "/home/a/venv3.6/lib/python3.6/site-packages/pandas/core/apply.py", line 257, in apply_standard
self.apply_series_generator()
File "/home/a/venv3.6/lib/python3.6/site-packages/pandas/core/apply.py", line 286, in apply_series_generator
results[i] = self.f(v)
File "/usr/local/bin/mans_to_es.py", line 755, in
+ [row[mf] for mf in info["message_fields"][row["datetype"]]]
TypeError: ('sequence item 1: expected str instance, NoneType found', 'occurred at index 0')
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/bin/mans_to_es.py", line 831, in main
mte.process()
File "/usr/local/bin/mans_to_es.py", line 626, in process
pool.starmap_async(self.process_file, tasks).get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
raise self._value
TypeError: ('sequence item 1: expected str instance, NoneType found', 'occurred at index 0')
^C

Work environment (please complete the following information):

  • OS: Ubuntu 16
  • Memory 64
  • Python version 3.6.8
@jaegeral jaegeral added the bug Something isn't working label Aug 23, 2019
garanews added a commit that referenced this issue Aug 28, 2019
fix #3 (sequence item 1: expected str instance, NoneType found', 'occurred at index 0) when no message fields are selected or are empty.
@garanews
Copy link
Member

garanews commented Oct 3, 2019

fixed in release 1.4 38329e2

@garanews garanews closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants