Support Questions
Find answers, ask questions, and share your expertise

Apache Atlas Import Error

New Contributor

Hi all,

I'm trying to perform an import in Atlas using Import API by leveraging Python Requests.

I have successfully exported data in a ZIP file previously using Python Requests.

Now, when I try to import data (on the same Atlas instance where I exported data from) I get an Null Pointer Exception Error.

Below is the code used to call Atlas Import API:

headers = { "Cache-Control" : "no-cache" }
local_filename = "/tmp/"
r =
    self.__import_api_url, # this is Atlas Server URL for Import API
    headers = headers,
    files = { "file" : (local_filename, open(local_filename, "rb"))},
    auth = (self.__user, self.__pwd) # authentication username and password

The response from Python Requests is:

{"errorCode":"ATLAS-500-00-001","errorMessage":"java.lang.NullPointerException: "in is null","errorCause":"in is null"}

Attached there is the log file generated by Atlas.


Any help is much appreciated!




New Contributor

Finally figured it out!

The problem was the files entry in the request.

The correct one is:

files = { "data" : (None, open(local_filename, "rb"))}

New Contributor

I'm able to perform an Import with cURL (as per documentation) using the same zipped file previously exported.

This is just to confirm the the export ZIP is not corrupted.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.