Project

General

Profile

Feature #935

Ability to import data

Added by Luke Murphey almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/17/2015
Due date:
% Done:

100%

History

#1 Updated by Luke Murphey almost 10 years ago

  • Status changed from New to In Progress

#2 Updated by Luke Murphey almost 10 years ago

Script is producing an error here:

Traceback (most recent call last):
  File "test_google_drive_app.py", line 118, in test_import_by_lookup_name
    self.google_lookup_sync.import_to_lookup_file(lookup_name, namespace, owner, "test_case_import", "data", session_key, create_if_non_existent=False)
  File "../src/bin/google_drive_app/__init__.py", line 180, in import_to_lookup_file
    self.import_to_lookup_file_full_path(destination_full_path, namespace, owner, google_spread_sheet_name, worksheet_name, session_key, create_if_non_existent, lookup_name=lookup_name)
  File "../src/bin/google_drive_app/__init__.py", line 253, in import_to_lookup_file_full_path
    lookupfiles.update_lookup_table(filename="/Library/Splunk/splunk/var/run/splunk/lookup_tmp/lookup_gen_20150119_134019_gZ7CRK.txt", lookup_file=lookup_name, namespace=namespace, owner=owner, key=session_key)
  File "../src/bin/google_drive_app/lookupfiles.py", line 105, in update_lookup_table
    raise e
InternalServerError: [HTTP 500] Splunkd internal error; [{'type': 'ERROR', 'text': "\n In handler 'lookup-table-files': Data could not be written: /nobody/search/lookups/test_case_import.csv: /Library/Splunk/splunk/var/run/splunk/lookup_tmp/lookup_gen_20150119_134019_gZ7CRK.txt", 'code': None}]
I have tried:
  • making sure that file handle is closed
  • Switching away from with statement
  • Hard coding the path (to a previous file iteration)

#3 Updated by Luke Murphey almost 10 years ago

The call from the lookup editor works. It looks like this:

lookupfiles.update_lookup_table("/Library/Splunk/splunk_sp/var/run/splunk/lookup_tmp/lookup_gen_20150119_134846_HiHTdT.txt", "test_case_import.csv", "search","nobody", "^u0Yamoqn57TakwWe47xxAv^esWa6qn_gdaoyHPbN1H4FeFeNeknPA_HOVlHRLSv4o9DiCnVCoTsB^RenjqIQkQKphoY1dTO6K3sDt2KnNJAJ7oKcamw")

My call looks like this:

lookupfiles.update_lookup_table("/Library/Splunk/splunk/var/run/splunk/lookup_tmp/lookup_gen_20150119_135023_fzVTvD.txt" "test_case_import.csv", "search", "nobody", "m7c7dMFkDH_jeRm4suJ_zsIgrgLdH9jaja5i0cuDlKYj6ThMQMGIv8I2gQEnL0ni^QK5zDJgDVjy4k^8zOWVkdgWGNILzQU812Ikmvm^" )

#4 Updated by Luke Murphey almost 10 years ago

It has something to do with the contents of the file. I forced the lookup editor to use my temporary path and it failed also.

#5 Updated by Luke Murphey almost 10 years ago

Figured it out. It was using the wrong Splunk instance.

#6 Updated by Luke Murphey almost 10 years ago

  • Status changed from In Progress to Closed
  • Target version set to 0.5
  • % Done changed from 0 to 100

Also available in: Atom PDF