Lulu Developer Forums

API Development Community

RSS Feed

Create project Issue

    • bg77
    • Topic created 2 years ago

    Hi,

    Anybody knows this error? {"error_value": "shell command failed: rm -rf '/opt/stable/stable/htdocs/items/volume_72/11781000/11781615' 2>&1\nrm: cannot remove directory `/opt/stable/stable/htdocs/items/volume_72/11781000/11781615/1/cover': Directory not empty", "error_type": "LFilesystemException"}

    Btw, I am using ASP.net and the error showed up in create project api to request content id.

    Message edited by bg77 2 years ago

  1. Josiah Gore2 years ago

    This is the result of an unexpected exception that is unfortunately masking the actual error you are encountering. Are you seeing this consistently? What is the project structure that you are sending to the create call?

  2. bg772 years ago

    Yes, unfortunately all the time I am seeing this. In fact I couldn't get a content id yet. My project structure is as follows;

    {

    "allow_ratings":false,

    "project_type":"softcover",

    "access":"public",

    "bibliography":{

      "title":"Asper at Work",
    
      "authors":[{
    
            "first_name":"Marie",
    
            "last_name":"Harder"}],
    
      "category":32,
    
      "description":"A book personalized by an Asper to explain their communication difficulties to work colleagues",
    
      "copyright_year":2010,
    
      "publisher":"ChangeableBooks.com",
    
      "language":"EN",
    
      "country_code":"GB"},
    

    "isbn":{"intent":"assigned"},

    "file_info":{

      "cover":[{
    
            "mimetype":"application/pdf",
    
            "file_id":30165}],
    
      "contents":[{
    
            "mimetype":"application/pdf",
    
            "file_id":30166}]},
    

    "physical_attributes":{

      "binding_type":"saddle-stitch",
    
      "trim_size":"SQUARE",
    
      "paper_type":"regular",
    
      "color":true},
    

    "pricing":[{

      "product":"print",
    
      "currency_code":"GBP",
    
      "total_price":5}]
    

    }

    Before this error; I was constantly getting error because of the size of the cover. When I fixed it, I faced with this error. Than I tried to generate a cover so maybe I could use it instead of the cover uploaded but it gave me error 500 no data posted. Now I am dealing with cover generation but I think it is not gonna solve my problem either. Do you think there is a wrong field in the project structure?

    Note: Sorry about the preview, I could't make it look like a whole code block.

  3. bg772 years ago

    Now somehow the error is changed,

    {"error_value": "shell command failed: rm -rf '/opt/stable/stable/htdocs/items/volume_72/11891000/11891339' 2>&1\nrm: cannot remove `/opt/stable/stable/htdocs/items/volume_72/11891000/11891339/1/cover/.nfs3852631900000019': Device or resource busy", "error_type": "LFilesystemException"}

  4. Josiah Gore2 years ago

    I haven't had any luck with reproducing or tracking down this error, but I am looking into it. Would it be possible for you to email your interior and cover files to api at lulu dot com? That would be useful for determining whether the problem is file-related, since the errors are occurring performing filesystem operations.

  5. bg772 years ago

    Sure, I just sent cover and content. I am now recreating project structure to check if anything missing or misspelled. And thank you very very much btw.

  6. Josiah Gore2 years ago

    I uploaded the files that you sent me and then performed a create call using the exact project structure you pasted above (just replacing the file ids), and the call was consistently successful.

    What library are you using to make the call? I'm wondering if there is something in the default behavior of the specific HTTP library you are using that is causing the issue.

    Try creating a file that looks like this

    project={ ... the structure you pasted above ... }
    

    and then use curl on the command line like this:

    curl -d '@project.json' 'https://apps.lulu.com/api/publish/v1/create?api_key=<api key>&auth_token=<auth token>
    

    where project.json is the file you just created. I have verified that this works for me without error.

  7. bg772 years ago

    Well I am using http request library to perform all operations. I will send the code which perform the create operation to your email but since all other operations are successful, there shouldn't be a problem. And I never used curl before so I downloaded it now and trying.

[ Page 1 of 1 ]