BCCN-Prog / weather_2016

For the BCCN 2016 advanced programming project
3 stars 1 forks source link

owm script crashes again #5

Closed erensezener closed 8 years ago

erensezener commented 8 years ago
RUNNING <module 'timeanddate_com' from '/home/pcp2016/weather_2016/scraping/timeanddate_com/__init__.py'>
RUNNING <module 'wetter_com' from '/home/pcp2016/weather_2016/scraping/wetter_com/__init__.py'>
RUNNING <module 'owm' from '/home/pcp2016/weather_2016/scraping/owm/__init__.py'>
downloading html for freiburg
Traceback (most recent call last):
  File "./run_scraping.py", line 37, in <module>
    provider.download(data_path)
  File "/home/pcp2016/weather_2016/scraping/owm/download_owm.py", line 43, in download
    soup = BeautifulSoup(content, 'lxml')
  File "/home/pcp2016/miniconda3/lib/python3.5/site-packages/bs4/__init__.py", line 156, in __init__
    % ",".join(features))
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: lxml. Do you need to install a parser library?

I have the bs4 library installed. Any ideas regarding the error?

clauslang commented 8 years ago

Don't know. Maybe this is relevant:

http://stackoverflow.com/questions/17766725/how-to-re-install-lxml

Otherwise, we could try to call BS without the 'lxml' argument. I just added it to get rid of a warning.

clauslang commented 8 years ago

Another quick fix might be

pip install lxml

(http://stackoverflow.com/questions/24398302/bs4-featurenotfound-couldnt-find-a-tree-builder-with-the-features-you-requeste)

erensezener commented 8 years ago

Pip cannot build lxml. Need to look into it more.

daveh19 commented 8 years ago

So, two questions: (i) why are these failures only happening on the server? (have you considered just installing anaconda on the server?) (ii) are they hurting the other scripts?

erensezener commented 8 years ago

(i) why are these failures only happening on the server? (have you considered just installing anaconda on the server?)

I have conda on the server. However, it does not have selenium, external display simulator etc.

(ii) are they hurting the other scripts?

No.

daveh19 commented 8 years ago

Good 👍

erensezener commented 8 years ago

Removing lxml from the arguments work