Web based family history software

This Help forum is for issues relates to the latest release (1.7.7). For issues related to beta or github version please use their own Help forum.
Before asking for help please read "How to request help" by clicking on that tab above here."

Question Problem importing .CSV files of Canadian provinces

  • arobinson88
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago - 7 years 7 months ago #1 by arobinson88
Hello,

I am running into an issues with importing the .csv files for all of the Canadian cities of the provinces of Alberta and Quebec. I have been able to successfully import the other 11 provinces however. The error i am running into when i attempt to import them through webtrees googlemap module is the following;
Code:
C:\xampp\htdocs\gene\includes\session.php:193 C:\xampp\htdocs\gene\app\Module\GoogleMapsModule.php:3722 Undefined offset: 9 #0 \app\Module\GoogleMapsModule.php:3722 ErrorException("C:\xampp\htdocs\gene\app\Module\GoogleMapsModule.php:3722 Undefined offset: 9") #1 \app\Module\GoogleMapsModule.php:104 adminPlaces() #2 \module.php:26 modAction('admin_places')

Now when i attempt to import this directly into the placelocation table of the database through phpmyadmin i get the following error;
Code:
Invalid column count in CSV input on line 1.

I have spent the last several hours looking at the .csv files for the other provinces to see if i can see the issue, but i can not. I have redownloaded the .csv files from www.webtrees.net/index.php/en/add-ons/do...61-canada-all-v2-zip i have also tried the v1 cpy of this file that is posted, but with no change.

Does anyone have any suggestions as to what to try?

Thanks
Last edit: 7 years 7 months ago by arobinson88.

Please Log in or Create an account to join the conversation.

  • thomas52
  • Offline
  • Premium Member
  • Premium Member
  • Western North Carolina
More
7 years 7 months ago #2 by thomas52
You could try to examine the .csv file to see if you can identify the irregularity.
Alternatively, divide the .csv in half and import. Keep dividing the file producing the error & importing.
Suggest you use a free source code editor like Notepad++ to divide the file.

"Failure is an amazing teacher." (L'échec est un professeur extraordinaire.)

Please Log in or Create an account to join the conversation.

  • arobinson88
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago - 7 years 7 months ago #3 by arobinson88
Replied by arobinson88 on topic Problem importing .CSV files of Canadian provinces
I have tried examining the .csv file without being able to find anything different from the other files. Splitting the file into smaller parts produces the same error both in phpmyadmin a well as webtrees.

Here is a random line from one of the .csv files that worked.
Code:
Level;"Country";"Province";"Place";"Extra";"Longitude";"Latitude";"ZoomLevel";"Icon" 1;Canada;Nova Scotia;;;-63.4;44.6;5;places/CAN/flags/NS.png 2;Canada;Nova Scotia;Abram River;;-65.951742;43.818739;10;

and here is a line from the Alberta .csv file
Code:
Level;"Country";"Province";"Place";"Extra";"Longitude";"Latitude";"ZoomLevel";"Icon" 1;Canada;Alberta;;;-116.6;53.9;5;places/CAN/flags/AB.png 2;Canada;Alberta;Abee;;-113.038456;54.197541;10;

and here is a line from the Quebec .csv file
Code:
Level;"Country";"Province";"Place";"Extra";"Longitude";"Latitude";"ZoomLevel";"Icon" 1;Canada;Québec;;;-73.5;52.9;4;places/CAN/flags/QC.png 2;Canada;Québec;Abbotsford;;-72.89035;45.436724;10;

part of the problem with the Quebec file i suspect is because of the bad formatting in the spelling of Quebec, but i can not see any differences between the files
Last edit: 7 years 7 months ago by arobinson88.

Please Log in or Create an account to join the conversation.

  • arobinson88
  • Topic Author
  • Visitor
  • Visitor
7 years 7 months ago #4 by arobinson88
Replied by arobinson88 on topic Problem importing .CSV files of Canadian provinces
Was able to fix the Alberta .csv file by copying the whole file into notepad++ and re-saving it as a .csv file. Unfortunately this did not work with the .csv file for Quebec

Please Log in or Create an account to join the conversation.

  • thomas52
  • Offline
  • Premium Member
  • Premium Member
  • Western North Carolina
More
7 years 7 months ago #5 by thomas52
Possibly a "search & replace all" Québec to Quebec might help.
Be sure to check both the top/front of the file as well as the bottom/end. Sometimes there will be "bad" lines, rows or characters at the end of the file.
You might also look at www.thoughtspot.com/blog/5-magic-fixes-m...on-csv-file-problems

"Failure is an amazing teacher." (L'échec est un professeur extraordinaire.)

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}