You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run the script, an error message appeared after trying to login to facebook. DEBUG log bellow:
[2020-05-21 16:41:41,728] fb2cal INFO (<module>) Starting fb2cal v1.0.4 (Production) [https://git.io/fjMwr]
[2020-05-21 16:41:41,730] fb2cal INFO (<module>) This project is released under the GPLv3 license.
[2020-05-21 16:41:41,730] fb2cal INFO (main) Attemping to parse config file config.ini...
[2020-05-21 16:41:41,733] fb2cal INFO (main) Config successfully loaded.
[2020-05-21 16:41:41,734] fb2cal INFO (main) Logging level set to: DEBUG
[2020-05-21 16:41:41,736] fb2cal INFO (main) Attemping to authenticate with Facebook...
[2020-05-21 16:41:41,744] urllib3.connectionpool DEBUG (_new_conn) Starting new HTTP connection (1): www.facebook.com:80
[2020-05-21 16:41:41,838] urllib3.connectionpool DEBUG (_make_request) http://www.facebook.com:80 "GET /login.php HTTP/1.1" 302 0
[2020-05-21 16:41:41,844] urllib3.connectionpool DEBUG (_new_conn) Starting new HTTPS connection (1): www.facebook.com:443
[2020-05-21 16:41:42,059] urllib3.connectionpool DEBUG (_make_request) https://www.facebook.com:443 "GET /login.php HTTP/1.1" 200 None
Traceback (most recent call last):
File "src/fb2cal.py", line 743, in <module>
main()
File "src/fb2cal.py", line 113, in main
facebook_authenticate(browser, config['AUTH']['FB_EMAIL'], config['AUTH']['FB_PASS'])
File "src/fb2cal.py", line 214, in facebook_authenticate
login_page = browser.get(FACEBOOK_LOGIN_URL)
File "/usr/local/lib/python3.7/dist-packages/mechanicalsoup/browser.py", line 127, in get
Browser.add_soup(response, self.soup_config)
File "/usr/local/lib/python3.7/dist-packages/mechanicalsoup/browser.py", line 70, in add_soup
response.soup = bs4.BeautifulSoup(response.content, **soup_config)
File "/usr/local/lib/python3.7/dist-packages/bs4/__init__.py", line 245, 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 was running this on Raspberry Pi 3 (Raspbian 10), Python 3.7.3.
I have installer prerequisites prior to running the app as described and lxml is installed, see the output bellow:
But the error still persisted. I managed to get this resolved by changing lxml to html.parser on src/fb2cal.py line #624 from: day_name = BeautifulSoup(birthday_date_str, 'lxml').get_text().lower()
to day_name = BeautifulSoup(birthday_date_str, 'html.parser').get_text().lower()
and file /usr/local/lib/python3.7/dist-packages/mechanicalsoup/browser.py line #35 from def __init__(self, session=None, soup_config={'features': 'lxml'},
to def __init__(self, session=None, soup_config={'features': 'html.parser'},
After that, worked like a charm, successfully imported calendar to google.
It might need to be checked why it ignored lxml but worked fine with html.parser.
The text was updated successfully, but these errors were encountered:
So I think the Pi just wasn't able to support lxml (maybe due to dependancies). A good solution here would be to prefer lxml and then fallback to html.parser if its unavailable.
When trying to run the script, an error message appeared after trying to login to facebook. DEBUG log bellow:
I was running this on Raspberry Pi 3 (Raspbian 10), Python 3.7.3.
I have installer prerequisites prior to running the app as described and lxml is installed, see the output bellow:
But the error still persisted. I managed to get this resolved by changing lxml to html.parser on src/fb2cal.py line #624 from:
day_name = BeautifulSoup(birthday_date_str, 'lxml').get_text().lower()
to
day_name = BeautifulSoup(birthday_date_str, 'html.parser').get_text().lower()
and file /usr/local/lib/python3.7/dist-packages/mechanicalsoup/browser.py line #35 from
def __init__(self, session=None, soup_config={'features': 'lxml'},
to
def __init__(self, session=None, soup_config={'features': 'html.parser'},
After that, worked like a charm, successfully imported calendar to google.
It might need to be checked why it ignored lxml but worked fine with html.parser.
The text was updated successfully, but these errors were encountered: