replaysMike / Binner

Open source parts inventory system for makers, electronics hobby, and professional engineers
https://binner.io
GNU General Public License v3.0
268 stars 41 forks source link

[Bug]: Failed to Import Data #180

Closed qwandorium closed 1 year ago

qwandorium commented 1 year ago

Binner version

2.2.5, 2.4.0 and 2.5.0

Operating System

Linux Mint x64, and Windows 10 x64

Describe the bug and the steps to reproduce it

First, thank you for making this useful piece of software available.

I was working with the 2.2.5 version on Linux mint x64. I exported the data in all the different types (.xlsx, csv, sql). Next I tried to import the data on the same version without any success. I tried the 2.4.0 version, with the same result, and today I tried the 2.5.0 version, still unable to import the data. I also installed the 2.4.0 and 2.5.0 versions on Windows, and tried to import, with the same result.

More details on the error: a JS toast appears with a success message, however in the text box below the import button (Import Result), there is a message of failed, and everything is at 0. Most of the time does not give me an Error. I have tried every combination of importing the different file types and with no result. Sometimes the toast is also unsuccessful. The file Projects.sql and .csv, provide a success import, with 0 things imported and a warning: [Row 0] Row contains invalid data, skipping:... I have made sure the format of the files was correct, according to the wiki.

As a separate test, I've generated an inventory of a single component in the clean installation of 2.4.0, I proceed to export this in .sql. When importing this, I'm able to get a success message, but still with 0 import, since it skipped the only row in the parts file (screenshot attached). The PartTypes file imported but skipped every part type, saying it already exists. Projects file was empty.

What should I do in this situation? Also, I've tried to join the discord with the button on this form, but it says the invite has expired.

I'm not sure if I should ask more questions here, since are not bugs, but if you can give me an answer it would be great:

  1. The wiki entry for "How to change the part label template" is empty, are you planning to fill it later? Is there some place you can point me in the direction of?
  2. How do you update the service on Linux, without having to make a clean installation?
  3. Is it possible to run Binner inside Docker?

I'm sorry for the text wall. And thank you again for your effort in making this freely available to everyone.

Would you like to attach your appsetings.json configuration?

No response

Screenshots or Videos (Optional, but they help!)

LM358_Parts_sql

Are you able to contribute a PR? (No is ok!)

None

replaysMike commented 1 year ago

Thanks for reporting this, I'll take a look and get it fixed for the 2.5.1 release.

replaysMike commented 1 year ago

Hi @qwandorium - sorry for the delay with this I was really tied up with the v2.5 release.

I've fixed the import issues however there might be an issue still if you're importing from CSV files. I discovered that when exporting as CSV quotes weren't being correctly escaped inside a quoted string. This might happen with DigiKey part information that contains inches in the PackageType. Such an instance would have to be manually corrected before importing. Example:

"14-DIP (0.300", 7.62mm)"

should be:

"14-DIP (0.300"", 7.62mm)"

Thank you for letting me know about the Discord invite link being broken, must be something to do with the vanity provider (I thought the link was permanent). I'll updated it now - the permanent invite link is https://discord.gg/74GEJY5g7G

Regarding the other questions:

The wiki entry for "How to change the part label template" is empty, are you planning to fill it later? Is there some place you can point me in the direction of?

How do you update the service on Linux, without having to make a clean installation?

Is it possible to run Binner inside Docker?

replaysMike commented 1 year ago

apologies, I updated the Discord link after realizing that it was the one that expired after 7 days. Updated to https://discord.gg/74GEJY5g7G just in case you're getting email updates.

replaysMike commented 1 year ago

and your fixed import issue will appear in v2.5.1 later today.

qwandorium commented 1 year ago

Great, thank you so much for your availability. I will test it later today. This was quite a quick response from your part.

replaysMike commented 1 year ago

Thank you, not a problem. If there are any issues still just reopen the ticket and I'll address immediately