This thread is getting a bit cumbersome.
I’ve created a support forum on my own site:
http://brandnewbox.co.uk/forums
Can I recommend further problems are raised there. I am more likely to see them and each can have there own thread.
Many thanks, Andrew
Hey all, I’m trying to use this plugin and I’m just gettin gobblygook when I try to run it.
I started with an excel file that I exported as a csv and when that didn’t work I saw the thread about the whole newline thing so I tried saving it as a txt but no go.
Here is my File
here is my code
{exp:csvgrab url="http://www.vulcancommittee.com/express/images/uploads/CongressionalFaxNumbers.txt"
delimiter=","
weblog="17"
title="1"
skip="1"
use="2"
fields="fax"
}
Here’s what I’m getting when I run the file… iondo� 202-225-3318 Rep. John Alder� iondo� 202-225-3318 Rep. John Alder� iondo� 202-225-3318 Rep. John Alder� name fax Sen. Jeff Sessions� iondo� 202-225-3318 Rep. John Alder� name fax Sen. Jeff Sessions�
any thoughts?
Hey, Thanks for the quick response… I fixed the file (I hope) but I’m still getting errors.. here’s the File
and here’s the error(s) I’m getting
Warning: fopen() [function.fopen]: php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\wamp\www\list\plugins\pi.csvgrab.php on line 192 Warning: fopen(http://www.vulcancommittee.com/express/images/uploads/CongressFax.txt) [function.fopen]: failed to open stream: php_network_getaddresses: getaddrinfo failed: No such host is known. in D:\wamp\www\list\plugins\pi.csvgrab.php on line 192 Warning: fgetcsv() expects parameter 1 to be resource, boolean given in D:\wamp\www\list\plugins\pi.csvgrab.php on line 202 Warning: array_unshift() [function.array-unshift]: The first argument should be an array in D:\wamp\www\list\plugins\pi.csvgrab.php on line 211
The last two errors repeat for what looks like the entire list.
Thanks!
I changed my code to include the encoder field for the couple entries with quotes.
{exp:csvgrab url="http://www.vulcancommittee.com/express/images/uploads/CongressFax.txt"
delimiter=","
weblog="17"
encloser="QUOTE"
title="1"
skip="1"
use="2"
fields="fax"
}
I really appreciate the help, this is my first experience with csv files so I may be missing something obvious. Thanks!
url="http://www.vulcancommittee.com/express/images/uploads/CongressFax.txt"
It appears that you are running PHP on Windows (maybe locally?) and it is having trouble fetching the file as a URL. Try copying the file to where you are running PHP and changing your url argument to a local file path. I’m not familiar with what PHP would be looking for in that case, but probably just giving the Windows path with forward slashes instead of reverse slashes would work.
Also put trace=”true” in your template, which will give you some better idea of what CSVgrab is doing.
well… I was trying to test the plugin on a local server where the only access I have is through EE (can’t manually upload the file) so as a quick fix I just uploaded the file to another website… obviously that didn’t work. I uploaded the file through the upload file button in EE which I could have done in the first place if I hadn’t been being lazy.
So now with the file on the same server as the plugin, I’m not getting any errors but I’m only getting one entry returned, so I’m guessing that would be some other issue? Maybe the newline thing but I’m not sure how to check that.
Thanks!
As a side note, I was able to fix the newline problem by downloading “plain text editor” for mac and then changing the “end of line” to windows.
I also had the publish plus module installed which wasn’t allowing access to the weblog, anyone know a workaround for that?
Thanks!
Hi Dan and Andrew,
Does the current version of CSV grab now incorporate Dan’s entry date fix? And can you also pick up the time from the CSV file (if so, what format does it have to be entered in)?
Can you please explain again the steps involved in entering time and date from a CSV file into a custom entry field – the “For Idiots” version, please. I couldn’t quite grasp the explanation given previously.
Thanks to both you guys for a great plug in and support for it.
EDIT I finally realized that the problem was that although I assigned Gypsy fields to the target weblog, I had not assigned a Field Group to the weblog I was trying to import into. Once I did that, I successfully imported some test entries. – It turns out that when I try an import into a weblog that is using Gypsy fields, the data is imported fine into the exp_weblog_titles table but NOT in the exp_weblog_data table. I just tried a test import on a different weblog on this same site that is NOT using Gypsy fields and it worked fine. Has anyone else had a problem importing into Gypsy fields? Is there a workaround?
I am also searching to see how to get this to work with Gypsy fields. Suggestions?
I cannot get this to work: using csvgrab 0.2.3 and EE ver 1.6.8
{exp:csvgrab url="/home/user/public_html/find.txt"
weblog="2"
title="5"
delimiter="TAB"
trace="true"
enclosure="QUOTE"
stagger="3600"
offset="21600"
use="4|5|6|7|8|9|10|11|12"
fields="find-a-physio-name|find-a-physio-company|find-a-physio-address1|find-a-physio-address2|find-a-physio-city|find-a-physio-postal-code|find-a-physio-telephone|find-a-physio-email|find-a-physio-website" }
Here is my TAB file saved as find.txt and uploaded in text mode via ftp:
"name" "company" "address1" "address2" "Corner Brook" "bbb222" "(709) 111 1111" "me@myemail.com" "website"
and I keep getting this error: Warning: fgetcsv() [function.fgetcsv]: enclosure must be a character in /home/user/public_html/admin/plugins/pi.csvgrab.php on line 202
Here is the trace: TRACE: Array ( [title] => Array ( [is_custom] => 0 [field] => 5 ) [date] => Array ( [is_custom] => 0 [field] => ) [find-a-physio-name] => Array ( [is_custom] => 1 [field] => 4 [id] => 4 [format] => none ) [find-a-physio-company] => Array ( [is_custom] => 1 [field] => 5 [id] => 5 [format] => none ) [find-a-physio-address1] => Array ( [is_custom] => 1 [field] => 6 [id] => 6 [format] => none ) [find-a-physio-address2] => Array ( [is_custom] => 1 [field] => 7 [id] => 7 [format] => none ) [find-a-physio-city] => Array ( [is_custom] => 1 [field] => 8 [id] => 8 [format] => none ) [find-a-physio-postal-code] => Array ( [is_custom] => 1 [field] => 9 [id] => 9 [format] => none ) [find-a-physio-telephone] => Array ( [is_custom] => 1 [field] => 10 [id] => 10 [format] => none ) [find-a-physio-email] => Array ( [is_custom] => 1 [field] => 11 [id] => 11 [format] => none ) [find-a-physio-website] => Array ( [is_custom] => 1 [field] => 12 [id] => 12 [format] => none ) )
TRACE: Resource id #48
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.