Start a new topic
Answered

Parsel error : Spider works locally, but not on scrapinghub

I receive this error when my spider runs

AttributeError: 'SelectorList' object has no attribute 'get'

   

for result in response.css('#listing-container > li > div.listing-item_body > div.listing-item_body--content'):
                 p = result.css('ul > li.lif__item.lif__pricing ::text').get()

   

Locally it works fine without errors and with the same params values.


I read it could be "parsel" but the version seems ok for scrapy upgrade command

Requirement already satisfied, skipping upgrade: parsel>=1.5 in c:\python27\lib\site-packages (from scrapy) (1.5.1)


Scrapy version

Scrapy 1.7.3


shub version

2.9.0


Any idea ?

thank you 



Best Answer

Locally you might have scrapy 1.7.3 but your deployed projects are using scrapy 1.4 stack.

See: https://support.scrapinghub.com/support/solutions/articles/22000200402-changing-the-deploy-environment-with-scrapy-cloud-stacks


Answer

Locally you might have scrapy 1.7.3 but your deployed projects are using scrapy 1.4 stack.

See: https://support.scrapinghub.com/support/solutions/articles/22000200402-changing-the-deploy-environment-with-scrapy-cloud-stacks

Thank you
Login to post a comment