Topic: Delver Lense import fails

I checked https://deckbox.org/forum/viewtopic.php?id=30992 to see if that would solve my issues, but unless my poor .csv skills are failing me, my issue seems to be somewhat different.

Ihave a .csv file exported from Delver Lense using the 'Deckbox - no tradelist' format. When I upload it to Deckbox, I get the result as shown below. In short the entire name column (for all rows) fails.

https://tweakers.net/i/OggMCWew_EhAgay-1gpyisfh1JE=/full-fit-in/4000x4000/filters:no_upscale():fill(white):strip_exif()/f/image/4pYQSsHSIiHXlCvRq4uNIVvs.png?f=user_large

At first I thought of special characters, but that wouldn't let the entries fail without special chars. I saved the .csv using MS Excel 2010 and encoded it in UTF-8.

Link to the file (forum won't let me upload it):
https://drive.google.com/file/d/1OhmOSP … sp=sharing

Any and all help would be greatly appreciated smile

Re: Delver Lense import fails

I took a look at the CSV and figured out the issue. Here's what a proper CSV is supposed to look like:

Count, Name                  , Edition              , Card Number[,etc]
4    , Young Wolf            , Dark Ascension       , 134
1    , Youthful Knight       , Stronghold           , 25
1    , "Yukora, the Prisoner", Betrayers of Kamigawa, 90

Notice how the only values that have quotation marks around them are ones with commas IN them, such as Yukora's name. In cases like Yukora, quotation marks are necessary for the parser to know which commas separate values versus which commas are part of the values. They "escape" the commas, to use programmer lingo.

But here's what yours looks like in a text editor (not Excel):

Count, Tradelist Count  ,  Name                    ,  Edition                  ,  Card Number
"4,"   ""              "," "Young Wolf"           "," "Dark Ascension"        "," "134"
"1,"   ""              "," "Youthful Knight"      "," "Stronghold"            "," "25"
"1,"   ""              "," "Yukora, the Prisoner" "," "Betrayers of Kamigawa" "," "90"

((Note that I've spaced everything out more so it's easier to see the issue.))

Notice how every single value is surrounded by quotation marks, and importantly, all the commas that are supposed to be separating values are instead surrounded by quotation marks and thus considered part of the value. This is why the Name column appears blank in the Deckbox error during import -- the value literally is blank, since there were no unescaped commas to help designate which column the name values were supposed to be in.

Now, the reason it doesn't look like that in Excel is because Excel is rendering the CSV content in a visually more meaningful way. So it removes all the extra quotation marks. But what you CAN observe in Excel is that everything is just in column A, instead of each value being in its own column.

So with all the under-the-hood background knowledge out of the way, a couple questions: Does DelverLens a) export a CSV directly, or b) just present you with a bunch of text that you have to copy-and-paste into a CSV file yourself? If it does a) and exports a CSV directly, have you tried importing using that file without ever opening and saving it in Excel? If b) and you have to save it as a CSV file yourself, then try saving it in a basic text editor like Notepad or something.

Basically, either DelverLens isn't giving you a useful export, or something in your process steps altered it to its current form. We need to figure out which so this doesn't happen to you in the future.


======================================


EDIT: So an easy fix within the already-created Excel file was to use the "Text to Columns" tool in the Data tab. I selected all of the values in column A, started the tool, chose "Delimited", under Delimiters unchecked Tab and checked Comma, left the Text Qualifier as the quotation mark, then pressed Finish. This separated all the values into individual columns, which can now import into DB.

However, just like in that other forum post you linked to, there were a bunch of mismatching edition names. I went ahead and helped you out by listing all of the ones you need to change and what to change them to.

Normal sets:

DELVERLENS NAME                           DROPBOX NAME
Commander 2011                            Commander
Duel Decks Anthology: Divine vs. Demonic  Duel Decks Anthology, Divine vs. Demonic
Duel Decks Anthology: Jace vs. Chandra    Duel Decks Anthology, Jace vs. Chandra
Foreign Black Border                      Foreign Black Bordered
Fourth Edition Foreign Black Border       Fourth Edition: Black Bordered
GRN Guild Kit                             Guilds of Ravnica Guild Kit
Intl. Collectors’ Edition                 International Collectors' Edition
Modern Masters Edition                    Modern Masters
Return to Ravnica Tokens*                 Extras: Return to Ravnica
Rivals Quick Start Set                    Introductory Two-Player Set
Summer Magic / Edgar                      Summer Magic
Time Spiral Timeshifted                   Time Spiral "Timeshifted"

* On this one, the card name also had to change by removing the word "token".

I recommmend double-checking all the ones marked as FBB, Summer Magic, Intro 2-Player, and Int'l Collectors. According to the guy from the other forum post, DelverLens has a harder time identifying those older cards, and all the ones he had that it marked as Summer Magic and the like ended up being normal versions of the card.

Promo sets:

CARD NAME             DELVERLENS SET NAME                DECKBOX SET NAME
Arbiter of the Ideal  Born of the Gods Promos            Prerelease Events
Temur War Shaman      Fate Reforged Promos               Intro Pack Alternate Art
Sin Collector         Friday Night Magic 2013            Friday Night Magic
Zameck Guildmage      Gatecrash Promos                   Magic Game Day Cards
Skarrg Goliath        Gatecrash Promos                   Launch Parties
Giant Growth          Junior Super Series                Super Series
Xathrid Gorgon        Magic 2013 Promos                  Prerelease Events
Jeering Instigator    Ugin's Fate                        Ugin's Fate Promos
Serra Angel           Wizards of the Coast Online Store  WotC Online Store
Sprouting Thrinax     Wizards Play Network 2008          WPN/Gateway
Master's Call         Wizards Play Network 2011          WPN/Gateway

Promos are the trickiest, because there is no standardized system for naming promo editions, nor even for grouping promos into editions. Notice how the DelverLens edition "Gatecrash Promos" turned into two different Deckbox editions, while two different DelverLens editions turned into the Deckbox edition "Prerelease Events". With promos, you just have to check them card-by-card on Deckbox. I'm not looking at all your cards, obviously, so double check that these Deckbox versions do indeed line up with what you own.

Last edited by meldon44 (2020-06-10 06:17:54)

Re: Delver Lense import fails

Thank you VERY much for your in depth analysis. It helped me import almost all cards sofar!

meldon44 wrote:

[...]
So with all the under-the-hood background knowledge out of the way, a couple questions: Does DelverLens a) export a CSV directly, or b) just present you with a bunch of text that you have to copy-and-paste into a CSV file yourself? If it does a) and exports a CSV directly, have you tried importing using that file without ever opening and saving it in Excel? If b) and you have to save it as a CSV file yourself, then try saving it in a basic text editor like Notepad or something.

Basically, either DelverLens isn't giving you a useful export, or something in your process steps altered it to its current form. We need to figure out which so this doesn't happen to you in the future.

I'll show the flow in Delver through a couple of screenshots (thumbnails, click to view). When you press the Export icon, the following pop-up appears:

234,176
In my case, I chose 'Create CSV file'.
I then get the option to add columns, choose the seperator or chose a preset. I chose the latter:
234,176
And then chose 'CSV - Deckbox - no tradelist':
234,176

The file is then being prepared and I can choose to either share or dowload it. What I did earlier was share it to my Google Drive, inspect through Excel then save and upload, resulting in those 5000+ errors. Upon reading your reply, I decided to instead download the file to my phone, and upload it directly to Deckbox. This resulted in only 40 errors:
234,176
I re-uploaded the valid rows, and now I have 5472 cards in my Inventory. Great stuff! You were right, Excel messed up the file.

However, just like in that other forum post you linked to, there were a bunch of mismatching edition names. I went ahead and helped you out by listing all of the ones you need to change and what to change them to.

Normal sets:

DELVERLENS NAME                           DROPBOX NAME
Commander 2011                            Commander
Duel Decks Anthology: Divine vs. Demonic  Duel Decks Anthology, Divine vs. Demonic
Duel Decks Anthology: Jace vs. Chandra    Duel Decks Anthology, Jace vs. Chandra
Foreign Black Border                      Foreign Black Bordered
Fourth Edition Foreign Black Border       Fourth Edition: Black Bordered
GRN Guild Kit                             Guilds of Ravnica Guild Kit
Intl. Collectors’ Edition                 International Collectors' Edition
Modern Masters Edition                    Modern Masters
Return to Ravnica Tokens*                 Extras: Return to Ravnica
Rivals Quick Start Set                    Introductory Two-Player Set
Summer Magic / Edgar                      Summer Magic
Time Spiral Timeshifted                   Time Spiral "Timeshifted"

* On this one, the card name also had to change by removing the word "token".

I recommmend double-checking all the ones marked as FBB, Summer Magic, Intro 2-Player, and Int'l Collectors. According to the guy from the other forum post, DelverLens has a harder time identifying those older cards, and all the ones he had that it marked as Summer Magic and the like ended up being normal versions of the card.

Promo sets:

CARD NAME             DELVERLENS SET NAME                DECKBOX SET NAME
Arbiter of the Ideal  Born of the Gods Promos            Prerelease Events
Temur War Shaman      Fate Reforged Promos               Intro Pack Alternate Art
Sin Collector         Friday Night Magic 2013            Friday Night Magic
Zameck Guildmage      Gatecrash Promos                   Magic Game Day Cards
Skarrg Goliath        Gatecrash Promos                   Launch Parties
Giant Growth          Junior Super Series                Super Series
Xathrid Gorgon        Magic 2013 Promos                  Prerelease Events
Jeering Instigator    Ugin's Fate                        Ugin's Fate Promos
Serra Angel           Wizards of the Coast Online Store  WotC Online Store
Sprouting Thrinax     Wizards Play Network 2008          WPN/Gateway
Master's Call         Wizards Play Network 2011          WPN/Gateway

Promos are the trickiest, because there is no standardized system for naming promo editions, nor even for grouping promos into editions. Notice how the DelverLens edition "Gatecrash Promos" turned into two different Deckbox editions, while two different DelverLens editions turned into the Deckbox edition "Prerelease Events". With promos, you just have to check them card-by-card on Deckbox. I'm not looking at all your cards, obviously, so double check that these Deckbox versions do indeed line up with what you own.

Indeed, this is what's left to do. The 40 invalid rows fail on exactly this point. It's 'only' 40 rows, so I could add them manually, but I'll try to do it through the .csv instead. Might learn something there wink

Thanks again!