MTurk HIT Database Mk.II

Keep track of the HITs you've done (and more!). Cross browser compatible.

< Feedback on MTurk HIT Database Mk.II

Question/comment

§
Posted: 2016-12-14

Problem importing old CSV file

So I don't much keep up with the scripts for this stuff and have been using the legacy one from awhile ago. I've recently been getting popups about CSVs being changed or some such and to visit some URL to fix it, which I ignored, as it happened immediately after I cleaned out my browser and figured it was from a year back when that big shakeup happened.

I go to update my database, though, and it basically overwrites the whole thing with only what it can grab currently. It kinda sucks, but do I have a backup from a few months ago, so I only lost 72 hits, versus the potential 800+ I could've.

I open the old backup I have in openoffice excel and paste the hits from what it could grab from the past couple months in to make it a bit more complete and try to import using this new script (With the old one disabled, of course).

I keep getting this: TypeError: Invalid key ';;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;' found in column header

This is the first cell in the CSV: "hitId,date,requesterName,requesterId,title,reward,status,feedback,"

How do I get it to import the 800 or so hits in my database to the new script?

feihtalityAuthor
§
Posted: 2016-12-14

What is the very first line in your csv file? Open it with a text editor and verify. The import is picking up a string of semicolons when it's expecting the header row.

§
Posted: 2016-12-14

http://imgur.com/a/VXc5X Here's two screenshots, one the first few lines as it shows up in wordpad, and one the first few lines as it shows up in OpenOffice's Excel

feihtalityAuthor
§
Posted: 2016-12-14

@Shado Please open the console (F12 or ctrl+shift+J). After trying to import, there should be a few lines that show the auto-detected delimiter, total number of lines, and header. What is this output?

§
Posted: 2016-12-14

Sure thing, is this what you're looking for? http://i.imgur.com/Zp5KUmY.png This didn't come up previously and it did with the console opened. Or is it this, which is found directly in the console itself? http://i.imgur.com/dOjLCfF.png

feihtalityAuthor
§
Posted: 2016-12-15

Okay, so... your original issue has been resolved? Based on those two screenshots, everything seems to be working as intended.

The failed lines dialog pops up when those entries are malformed and cannot be parsed. As you can see, the failing error is that the number of fields do not match the number of columns. There are eight columns defined by the header. The failed lines contain 15 fields. These lines are composed of the same HIT that has been duplicated and merged together by the legacy version. Note that the second HIT does not contain a valid HIT ID.

Solution here is to just delete everything after the feedback field, which is a blank string. These entries should also end with that blank string and not a comma. Once you've done that, click the Retry button and it will attempt to reparse the entries.

§
Posted: 2016-12-15

I guess so? That dialog box wasn't coming up originally and it's the same file I've been trying, so I'm not sure why it failed in the first place. I just skipped the 4 broken hits and it seems to have imported fine.

Thanks for the help.

Post reply

Sign in to post a reply.