toby-p / rightmove_webscraper.py

Python class to scrape data from rightmove.co.uk and return listings in a pandas DataFrame object
MIT License
253 stars 113 forks source link

Fails on import #20

Closed HarvsG closed 4 years ago

HarvsG commented 4 years ago

Seems there are some syntax errors in innit.py

Traceback (most recent call last):
  File "scrape.py", line 7, in <module>
    from rightmove_webscraper import rightmove_data
  File "/home/pi/notebooks/HouseData/HouseFinderENV/lib/python3.5/site-packages/rightmove_webscraper/__init__.py", line 65
    raise ValueError(f"Invalid rightmove search URL:\n\n\t{self.url}")

then on fixing that

Traceback (most recent call last):
  File "scrape.py", line 7, in <module>
    import rightmove_webscraper
  File "/home/pi/notebooks/HouseData/HouseFinderENV/lib/python3.5/site-packages/rightmove_webscraper/__init__.py", line 99
    assert by in self.get_results.columns, f"Column not found in `get_results`: {by}"
                                                                                    ^
SyntaxError: invalid syntax
toby-p commented 4 years ago

Which version of Python are you using? The latest version requires Python 3.6 or above as it uses f-strings

toby-p commented 4 years ago

Have added specification to setup.py that it requires python 3.6 or above.