HtmlResponse' object has no attribute 'follow'

Posted about 7 years ago by jward

Post a topic
Answered
j
jward

 ```

    def parse(self, response):
        # for testing single practice link
        # return self.parse_practice(response)
        for practice_row in response.css('table.listing-display tr'):
            practice_links = practice_row.css('a::attr(href)')
            if len(practice_links) > 0:
               yield response.follow(practice_links[0], self.parse_practice)
```


Why is it breaking on `response.follow(...)` ? it works fine locally just not on scrapinghub.com.

Local running Scrapy version 1.4.0

0 Votes

thriveni

thriveni posted about 7 years ago Admin Best Answer

The error seems to be due to different Scrapy versions. The deploy to Scrapinghub has been done using Scrapy stack 1.1. You would need to change the stack in your projects scrapinghub .yml as given in article Changing the deploy environment with Scrapy Cloud Stacks  

1 Votes


2 Comments

Sorted by
j

jward posted about 7 years ago

Thanks thriveni!

 

0 Votes

thriveni

thriveni posted about 7 years ago Admin Answer

The error seems to be due to different Scrapy versions. The deploy to Scrapinghub has been done using Scrapy stack 1.1. You would need to change the stack in your projects scrapinghub .yml as given in article Changing the deploy environment with Scrapy Cloud Stacks  

1 Votes

Login to post a comment