I've tried importing the /tests/node.csv but am getting this error:

"An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=20&op=do StatusText: Internal Server Error ResponseText:"

Feels to me like a Server permissions rewrite/permissions rebuff but not sure whether something to do with .htaccess or settings.php. In Admin permissions I have everything checked as ok so can't understand.. Believe my .htaccess is standard D7 issue [see attached].

Am also running within a customized, sub-theme of Zen.

CommentFileSizeAuthor
#25 drush_feeds_import.tgz1.76 KBj0rd
htaccess.txt1.75 KBdeeve
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

deeve’s picture

..just as an update: I've noticed the .csv file I'm trying to import does make it to my temp folder of 'sites/default/files/feeds/' but seems to not get any further. Could this be something to do with the .htaccess file in the files folder? All I have in there is the following:

SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks
deeve’s picture

..interesting development; when I receive the error as above, if I then immediately refresh the page, the loading bar reaches 100% & I receive the following error: 'Cannot acquire lock for source node / 0.'

deeve’s picture

Beginning to feel like I'm talking to myself on here!
I just read on the 7.x-2.x-dev release notes not to use that version, when my admin had advised to upgrade to that! So, I downgraded to the 7.x-2.0-alpha4 version thinking this may make a difference - it didn't! Same exact problem/s. Am I to therefore understand the D7 version of Feeds does not work as yet when importing CSV files?

deeve’s picture

Version: 7.x-2.0-alpha4 » 7.x-2.x-dev

Have changed version in this thread to 7.x-2.x-dev as tried & received same error. Took a look at the csv in Temp folder on server & looks like parser and/or processor not being able to distinguish between rows? Does anyone on here have a nodes.csv other than one supplied in tests folder which I could try? Am confused as to precisely how the file should be formatted..

deeve’s picture

Status: Active » Fixed

I did some more reading yesterday & followed an article I found elsewhere on someone who experienced a similar problem when trying to use Excel spreadsheets on a Mac. He recommended using Google Docs so I tried it & sure enough, it worked first time!

Must be something to do with the default CSV export in MS Excel that either adds or omits the necessary formatting for Feeds to interpret correctly. Anyway, all I do now know is Feeds 7.x-2.x-dev seems to be working fine for me now using Google Docs.

Dale Baldwin’s picture

Hey I'm getting the same error using xml files so may be more than just a csv formatting issue

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /?q=batch&id=34&op=do StatusText: Internal Server Error ResponseText:

deeve’s picture

Have you tried the Google Docs route?

Dale Baldwin’s picture

Google Docs would be great however I'm talking about pulling down a few thousand xml files on a daily basis so not really an option.

deeve’s picture

Status: Closed (fixed) » Fixed

Maybe something's not quite right in the parser element as I found it was having troubles returning line-breaks correctly, even with CSVs in the test folder's files. Having worked with db's in the past, I was under the impression you had to declare a separator for both column & row.. That said, mine now appears to work fine when formatted in Google Docs. Good luck with all those feeds, sorry I can't be of more help.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

John Bryan’s picture

If you are not using taxonomy with Feed items then this comment is not relevant.

If you are trying to have RSS or XML (etc.) "Feed Item" nodes inherit a taxonomy term from the parent "Feed" importer node and seeing "An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows." :-

Multiple Feed project issues have been created for this, or with similar message but the relvant one appears to be:-
"taxonomy_node_get_terms doesn't work with drupal 7"
http://drupal.org/node/959984

brandy.brown’s picture

Status: Fixed » Active

Google docs does not solve my problem. I am able to upload some csv documents without problem, but for others, it throws this error. Seems to be an intermittent problem.

rsgracey’s picture

Component: Miscellaneous » Feeds Import

Never mind...still not working...

pwaterz’s picture

Highly recommend not using feeds for this, and doing something custom. At my job we process 100,000+ xml files into drupal and feeds can not to that.

brandy.brown’s picture

I don't think not using feeds is a solution to this problem.
Perhaps upping the PHP memory limit is a solution? Just a thought.

Sivert’s picture

I had the same error message. The patch at http://drupal.org/files/feeds-unsupported_opperand_types-1213472-28.patch fixed the problem for me. Or see comment #28 at http://drupal.org/node/1213472.

j0rd’s picture

I believe this has something to do with bad characters in the csv.

I created a CSV file with entries with crazy characters and it fails immediately.

Then I imported some files with no bad characters and it works fine.

Then I tried to do a file with both, and I got 28% of the way though before it failed.

Here's some text samples from my 100% fail file.

C/ Álvaro Cunqueiro, 2 - entrepl, A Coruña, Spain
C/ Valdoreix, 56 - 1º - 09172 Sant Cugat del Valles , Barcelona , Barcelona, Spain
C/ Claudi Guell, 4 - 1º - 2ª, Santa Coloma de Cervelló , Barcelona - 08690, Spain

{"results":[{"formatted_address":"A Coruña, Spain","types":["locality","political"],"address_components":[{"types":["locality","political"],"short_name":"A Coruña","long_name":"A Coruña"},{"types":["political"],"short_name":"A Coruña","long_name":"A Coruña"},{"types":["administrative_area_level_2","political"],"short_name":"C","long_name":"A Coruña"},{"types":["administrative_area_level_1","political"],"short_name":"GA","long_name":"Galicia"},{"types":["country","political"],"short_name":"ES","long_name":"Spain"}],"geometry":{"viewport":{"southwest":{"lat":43.337341,"lng":-8.4382592},"northeast":{"lat":43.3864073,"lng":-8.3871082}},"location":{"lat":43.3623436,"lng":-8.4115401},"location_type":"APPROXIMATE","bounds":{"southwest":{"lat":43.337341,"lng":-8.4382592},"northeast":{"lat":43.3864073,"lng":-8.3871082}}}}]}

{"results":[{"formatted_address":"Carrer Molí de Valldoreix, 56, 08197 Sant Cugat del Vallès, Barcelona, Spain","types":["street_address"],"address_components":[{"types":["street_number"],"short_name":"56","long_name":"56"},{"types":["route"],"short_name":"Carrer Molí de Valldoreix","long_name":"Carrer Molí de Valldoreix"},{"types":["locality","political"],"short_name":"Sant Cugat del Vallès","long_name":"Sant Cugat del Vallès"},{"types":["administrative_area_level_2","political"],"short_name":"B","long_name":"Barcelona"},{"types":["administrative_area_level_1","political"],"short_name":"CT","long_name":"Catalonia"},{"types":["country","political"],"short_name":"ES","long_name":"Spain"},{"types":["postal_code"],"short_name":"08197","long_name":"08197"}],"geometry":{"viewport":{"southwest":{"lat":41.4551018197085,"lng":2.0691524697085},"northeast":{"lat":41.4577997802915,"lng":2.0718504302915}},"location":{"lat":41.4564499,"lng":2.0704923},"location_type":"RANGE_INTERPOLATED","bounds":{"southwest":{"lat":41.4564499,"lng":2.0704923},"northeast":{"lat":41.4564517,"lng":2.0705106}}},"partial_match":true}]}

{"results":[{"formatted_address":"Carrer Claudi Güell, 4, 08690 La Colònia Güell, Barcelona, Spain","types":["street_address"],"address_components":[{"types":["street_number"],"short_name":"4","long_name":"4"},{"types":["route"],"short_name":"Carrer Claudi Güell","long_name":"Carrer Claudi Güell"},{"types":["locality","political"],"short_name":"La Colònia Güell","long_name":"La Colònia Güell"},{"types":["administrative_area_level_2","political"],"short_name":"B","long_name":"Barcelona"},{"types":["administrative_area_level_1","political"],"short_name":"CT","long_name":"Catalonia"},{"types":["country","political"],"short_name":"ES","long_name":"Spain"},{"types":["postal_code"],"short_name":"08690","long_name":"08690"}],"geometry":{"viewport":{"southwest":{"lat":41.3611724197085,"lng":2.0262381197085},"northeast":{"lat":41.3638703802915,"lng":2.0289360802915}},"location":{"lat":41.3625214,"lng":2.0275871},"location_type":"ROOFTOP"},"partial_match":true}]}
j0rd’s picture

I seem to be able to get passed the 'Cannot acquire lock for source node / 0.' by dealing with these 3 items.

Additionally, if you have mega files like me:
PHP max_execution time will eventually kill the batch process main thread.

Additionally, if you're running fastcgi like me:
FPM's request_terminate_timeout will eventually kill the batch process main thread.

Additionally, if you're like me and running into timeouts:
The acquire_lock in {semaphore} will remain until it times out and you'll need to DELETE it from the {semaphore} table before restarting the batch.

Best way to import would be through CGI and Drush. I don't believe feeds provides anything currently to handle this...but I did find this sandbox, but have yet to test it out.
http://drupal.org/sandbox/enzo/1865202

Summit’s picture

Hi,

Also error 500 on xml with 130000 lines...how can I get this imported with feeds without having to cut the xml into 10 pieces of xml?
Background option is not working, then also crash of site.
Greetings,
Martijn

J0keR’s picture

same problem here when i upload the csv file, but there is only 500+ rows in my csv file. maybe is bad chinese characters i guess...... any ideas ?

nyancat’s picture

Component: Feeds Import » Code

So characters such as ñ are causing feeds to spit an error? Mine was freezing at 40%, I'm trying to figure out what character in my file is causing this issue.

Grubber’s picture

I found a fix (not really!, but). Unlocking the importer showed me that 30% items were imported, then I re-imported the same file, it went to 30 % in less than a second then stuck at 56%. I was able to import in 3-4 tries. I know this isn't the right way but got no choice right now. Can php_upload limit be the culprit ? because by default, it allows uploads of only 2mb and my file size is 5mb

j0rd’s picture

I would recommend using a drush script to import. I posted enzo's sandbox in #19. I've patched it for my needs. I believe I posted those patches in his sandbox. There's also a feeds variable which needs to get updated, which limits an import to a certain amount of items, if you're using that script.

I believe anyone who's doing this via the web is running into PHP execution time problems, or memory limit problems or what every else type problems, which can be avoided by using the CLI via drush (providing your CLI has high values).

I imported a couple thousand items 2-3 days ago with out issue using that script. My CSV for that import had many UTF-8 strange chracters, and as long as you're making sure your encoding is ok, you will not have problems.

j0rd’s picture

Issue summary: View changes
FileSize
1.76 KB

I've .tgz'd up enzo's sandbox with my patches for ease of use. I also wrote a small README.txt in the folder for those who are interested. I know there's other drush feed importers, but I've been using this one for about a year and it works fine for my needs.

MegaChriz’s picture