cancel
Showing results for 
Search instead for 
Did you mean: 

Inference Service for Topic Detection Error

former_member245174
Participant
0 Kudos

Hello all,

I'm trying to use the Topic Detection API from the SAP API Business Hub. Trying to run it directly from the website itself by using the "Try it out" feature.

I use a zip file with 2 .txt files in it and use the sample form data for providing input. But I get back a 400 response with error as (below):

Could someone please help me understand what I am doing wrong. Thanks!

{
  "error": {
    "code": "400",
    "message": "Invalid File Input: Absolute path, or hierarchy in archive file is not allowed",
    "requestId": "c1a3d32f-90e4-4d3d-634d-c1636199bef6"
  }
}

nabheetscn
Active Contributor

I just tried with 2 text files zipped into one and below mentioned parameters it worked. Can you please attach your files.

{"numTopics":2, "numTopicsPerDoc":1, "numKeywordsPerTopic":15}

Accepted Solutions (0)

Answers (3)

Answers (3)

Pavan_Golesar
Active Participant
0 Kudos

Problem: The files are placed under (another) directory i.e. folder is zipped.

Solution: Instead of folder, the files should be zipped. i.e. Select the files and then select add to .zip

I faced the same issue and found that the files are not placed DIRECTLY inside the .zip file like Lars Gregori said.

Hope this helps.

Br,

Pavan Golesar

lars_gregori
Advisor
Advisor
0 Kudos

Your zip file contains the __MACOSX directory and they are inside a directory.
Use the zip command: zip data.zip *.txt

former_member245174
Participant
0 Kudos

Hi nabheet.madan3 thanks for your kind response. Please find a link to access the files I had used.

Link: https://filebin.net/qscysyqa5d58pnio

Thank you! Please let me know if you are unable to access the link.