-
Notifications
You must be signed in to change notification settings - Fork 593
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
Error on CSV import #565
Comments
FYI, copy and paste of the example CSV gives the same result:
|
Hi there! I'm not clear what you're trying to do. It looks as though you're invoking Timesketch as a library. Can you tell me more about how you're trying to import the csv? |
Hi! I'm importing via the CVS upload functionality in the /timelines page. |
Are you using the most recent clone from master? |
See #548 |
Yup this is fixed in that issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Getting the following error upon import:
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/timesketch/lib/tasks.py", line 143, in run_csv_jsonl for event in read_and_validate(source_file_path, delimiter): File "/usr/local/lib/python2.7/dist-packages/timesketch/lib/utils.py", line 52, in read_and_validate_csv reader = csv.DictReader(fh, delimiter=delimiter.decode('string_escape')) File "/usr/lib/python2.7/csv.py", line 79, in __init__ self.reader = reader(f, dialect, *args, **kwds) TypeError: "delimiter" must be an 1-character string
I'm using the following snippet to generate the code (python 2):
writer = csv.DictWriter(write_file, fieldnames=fieldnames, quoting=csv.QUOTE_ALL, delimiter=',', quotechar='"', dialect='excel')
writer.writerow({'message':line.strip(), 'timestamp':timestamp, 'datetime':isodatetime, 'timestamp_desc':'test'})
The text was updated successfully, but these errors were encountered: