Welcome to the Birder's Diary Forum for Support And General Questions
Use the Support forum for all questions or issues.
Use the Wish List forum to leave your ideas for improving Birder’s Diary.
Use the Community Sharing forum for sharing Photos, Trips, Stories, etc.
Setup your Forum photo and profile here.
[Solved] Intermittent Error importing .csv eBird lists
I have just been importing multiple lists from eBird for the first time in BD 6.0. When I open the Import window, and Click the Import Sightings from eBird export file button, the program properly imports the first file, and allows me to delete it when finished. Then, when I try to import the next eBird file, after navigating to and choosing the next file I want to import, I SOMETIMES get the following series of errors:
Then two of these
The first seems to imply that BD is looking for a default .csv file, which does not exist, and is not the file I have chosen.
After this error, the behavior of the program is again unpredictable. Sometimes, after this first failed import, when I reselect the same file choosing operation without closing the 'Import/Export' bundle of windows the program will properly read the file. Other times, it will again generate the same set of errors, and this can continue over many iterations. Reading the file might be successful after 2, 3, or 4 tries. After that, I have given up and closed the Import/Export window bundle, and this always seems to clear the error, and enable at least one more file to be read.
Another, possibly unrelated behavior is that after a succesful Import, the cursor can either return to its ready state, or sometimes remains as the Windows 'waiting' state of a blue circle. However, this cursor state does not seem to predict whether the next attempt to import will be successful.
The error occurs about a quarter of the imports I attempt, but again it might go 10 files without an error, then occur for two consecutive files - or not.
What makes this particularly annoying is a perhaps separate issue that the program forgets that I have told it to substitute 'Rock Dove' for the eBird 'Rock Dove (Feral Pigeon)', (as well as other rarer substitutions) so each time I exit the Import/Export bundle, the substitutions have to be reentered.
Thanks for all the details and the screen captures. Helps a lot.
[Previous text removed]
I had written some text thinking that this was due to having the file open in Excel. But after digging into some code, I find that this is not the case and already had some code to deal with this situation: RTE 3051. From v5.3.13, 4-Jan-2022. This is from a previous post from you David.
errRetryCnt starts out at 2. So you get two retries before it fails. This seemed to fix your problem from one year ago. Oddly, almost exactly the same time of year. I wonder if this has something to do with the first week of the year??? Weird, but can't rule out the coincidence.
After 2 tries, then you get the other errors.
More digging... see next two posts also please.
Here's the link to last year's post in these forums.
Another question David.
Are you importing multiple files at once? You can do that. You can select 2 or more files in the file selection window to import, and they will be imported one after the other. Or, are you just selecting one file at a time?
Also, can you send your "eBirdSightingsImport.log" file to me at Jeff@BirdersDiary.com? Thx
Log file sent to your email address from above.
I will release something along those lines for you to test later this week. I have a few ideas I want to test out before I release anything.
Will update here when ready.
Boy, oh boy! As much as I want to blame everything else for my bad code, it always comes back to my bad code! 😜
I found the problem. After writing a lengthy reply here on how this must be a bug in Windows as nothing in VB6 is multi-threaded, it always helps to write down your thinking just so you can see how wrong you are. There is one thing (not in my code, but in the VB runtime engine) that is multithreaded! The VB Runtime Garbage Collector. Then, I thought, well, what could I be doing such that the GC might be exhibiting this behavior. Well, only if I got rid of the Class Object before closing the file. So I went looking. And sure enough, I did not close the file; simply deleted the Class Object. Which does the same thing - e.g. Close the File - but only when the GC gets around to it; i.e. asynchronously. And so, once in a while, the GC hasn't gotten around to doing this before the Access Import statement executes!!! That is why it works 80% of the time, and fails the other 20%, or so in your case.
Now, I am unable to test this, as I am unable to reproduce this on my development machines. But that is also explained by the Garbage Collector. Because in VB development mode, everything is STRICTLY SEQUENTIAL, even the GC!!! So I was never going to put all of these pieces of the puzzle together without this trial-n-error process that I had to go through, in order to come around to this Eureka moment.
So, while I am not 100% certain that this is the fix, it is consistent with All of the symptoms so far experienced, and is the only answer that comes close.
I will have Build 23 up in a few moments for you to download and try. Please get back to me after testing and let me know.
Build 23 is now available!
Going to go ahead and mark this solved David. When you get around to testing this, please let me know. Thanks.