Error Message: idml is not a zip file
Thanks for sharing these codes!
I tried running your example .py with your .idml and .csv and received this error:
Traceback (most recent call last):
File "/Users/xxx/Downloads/BatchIDMLGenerator-master/batch_idml_editor.py", line 34, in
What could be the issue?
Hi @emuda. I haven't looked at this code in a while, but based on you error, it seems like maybe it is trying to open the wrong file. In particular, the first line shows /Users/xxx/Downloads/BatchIDMLGenerator-master but the last line shows /Users/xxx/Downloads/example/. It should be looking in the /Users/xxx/Downloads/BatchIDMLGenerator-master/example folder for the idml file.
Can you confirm that your folder looks like in this screenshot (with the Python file 1 directory above the example folder?
Could you also share how you are running the script. It is possible that if you were running it from a different directory (for example python3 BatchIDMLGenerator-master/batch_idml_editor.py ) that you might have an error like this.
Thanks for the prompt response Ben! You were right. I had the files in separate folders. I placed them in the same one and it worked.
It also worked on my idml and csv and the script provided me separate idml for each of my csv entry. However, all the content defaults at the content of the 1st entry but with separate filenames. Any thoughts on what could be the issue?
Thanks!
I got it working! Instead of using << and >> I used ### based on your example.
Do you know if this script works with importing images as well?
I am also having the issue importing images into the IDML file. Would love some best practices here? I can only get as far as getting the image file name into the idml but not the image itself.
Hi @emuda. I'm glad you were able to get it working. I think the "###" is needed because of how the script is written.
Unfortunately, I don't think this tool is going to be able to manage including images. I believe it will only work with text itself.