maxammann / trello-to-deck

trello-to-deck reads from an JSON export of Trello and creates a board in Nextcloud Deck.
MIT License
67 stars 9 forks source link

Error when migrating identically named files #14

Closed connorjward closed 4 years ago

connorjward commented 4 years ago

Hi,

When I tried to migrate my Trello board I hit an error because I had a card where there were two attachments with the same name (in my case image.png). This gave me the following command line error:

Created card <card name>
                Ataching https://trello-attachments.s3.amazonaws.com/<hash1>/image.png to card <card name>
                Ataching https://trello-attachments.s3.amazonaws.com/<hash2>/image.png to card <card name>
The response was: b'{"status":409,"message":"File already exists.","data":{"cardId":180,"type":"deck_file","data":"image.png","lastModified":1605129490,"createdAt":1605129490,"createdBy":"admin","deletedAt":0,"extendedData":[],"id":9}}'

The actual error occurred in deck.postFiles().

Cheers.

maxammann commented 4 years ago

Thanks for the report, I'll take a look at the weekend! I think best would be to attach some id to the filename

connorjward commented 4 years ago

Yeah I definitely think that would be the most robust. In my case to solve it I just deleted the files causing the problem and restarted. Thanks for your work on this tool by the way! Should definitely save my team quite the headache of getting the stuff moved across.

maxammann commented 4 years ago

I added the date instead. this should add enough uniqueness