Parsel error : Spider works locally, but not on scrapinghub

Posted about 5 years ago by Luca

Post a topic
Answered
L
Luca

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 


0 Votes

nestor

nestor posted about 5 years ago Admin 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

0 Votes


2 Comments

Sorted by
L

Luca posted about 5 years ago

Thank you

0 Votes

nestor

nestor posted about 5 years ago Admin 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

0 Votes

Login to post a comment