Closed kbzowski closed 3 years ago
@kbzowski what's your current config? Have you changed the website from mbasic to anything else?
I tried to follow instructions in README. Installed using pipenv and python 3.9
pipenv shell
pip install .
playwright install chromium
python3 -m facebook_rss --login -u [my_mail] -p [my_pass]
uvicorn facebook_rss.main:api
And made a request to http://127.0.0.1:8000/page/piwapodwiaduktem Nothing was changed in .env
I tried to follow instructions in README. Installed using pipenv and python 3.9
pipenv shell pip install . playwright install chromium python3 -m facebook_rss --login -u [my_mail] -p [my_pass] uvicorn facebook_rss.main:api
And made a request to http://127.0.0.1:8000/page/piwapodwiaduktem Nothing was changed in .env
This is weird... I have Python 3.9.1 as well and I can generate the feed of the page you provided.
Here's the log from my terminal
❯ uvicorn facebook_rss.main:api
2021-02-19 18:20:47,223 [INFO] uvicorn.error [server.serve:63]: Started server process [12883]
2021-02-19 18:20:47,223 [INFO] uvicorn.error [on.startup:26]: Waiting for application startup.
2021-02-19 18:20:47,223 [INFO] fastapi [main.startup_event:44]: Performing startup tasks...
2021-02-19 18:20:47,223 [INFO] fastapi [main.startup_event:50]: Login cookies file was found, setting working mode to use account!
2021-02-19 18:20:47,223 [INFO] uvicorn.error [on.startup:38]: Application startup complete.
2021-02-19 18:20:47,226 [INFO] uvicorn.error [server.startup:166]: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
2021-02-19 18:21:06,733 [INFO] uvicorn.access [httptools_impl.send:458]: 127.0.0.1:37682 - "GET / HTTP/1.1" 404
2021-02-19 18:21:14,033 [INFO] uvicorn.access [httptools_impl.send:458]: 127.0.0.1:37698 - "GET /docs HTTP/1.1" 200
2021-02-19 18:21:14,890 [INFO] uvicorn.access [httptools_impl.send:458]: 127.0.0.1:37698 - "GET /openapi.json HTTP/1.1" 200
2021-02-19 18:21:30,997 [INFO] browser [browser.get_browser:57]: Browser launched with saved cookies.
2021-02-19 18:21:31,001 [INFO] cache [decorators.wrapper:21]: No valid cached feed found for piwapodwiaduktem, getting a new feed...
2021-02-19 18:21:34,842 [INFO] cache [decorators.wrapper:26]: Feeds cache has been updated.
2021-02-19 18:21:34,843 [INFO] uvicorn.access [httptools_impl.send:458]: 127.0.0.1:37726 - "GET /page/piwapodwiaduktem HTTP/1.1" 200
2021-02-19 18:21:34,845 [INFO] browser [browser.get_browser:64]: Saved updated Browser cookies locally.
2021-02-19 18:21:34,885 [INFO] browser [browser.get_browser:66]: Browser shutdown.
And the generated feed https://del.dog/fenupidutu.txt
Anyways, the log says that there's an issue with Playwright library. Can you send the output of pip freeze
command?
click==7.1.2
colorama==0.4.4
dateparser==1.0.0
facebook-rss @ file:///E:/PRIV_PROJECTS/facebook2rss
fastapi==0.63.0
feedgen==0.9.0
greenlet==1.0.0
h11==0.12.0
lxml==4.6.2
playwright==1.8.0a1
pydantic==1.7.3
pyee==8.1.0
python-dateutil==2.8.1
python-dotenv==0.15.0
pytz==2021.1
PyYAML==5.4.1
regex==2020.11.13
six==1.15.0
SQLAlchemy==1.3.23
starlette==0.13.6
typing-extensions==3.7.4.3
tzlocal==2.1
uvicorn==0.13.3
watchgod==0.6
websockets==8.1
I am on Windows 10 if it makes any difference.
I am on Windows 10 if it makes any difference.
@kbzowski Can you try running uvicorn facebook_rss.main:api --loop asyncio
?
$ uvicorn facebook_rss.main:api --loop asyncio
2021-02-19 19:42:25,659 [INFO] uvicorn.error [server.serve:63]: Started server process [28276]
2021-02-19 19:42:25,660 [INFO] uvicorn.error [on.startup:26]: Waiting for application startup.
2021-02-19 19:42:25,661 [INFO] fastapi [main.startup_event:44]: Performing startup tasks...
2021-02-19 19:42:25,662 [INFO] fastapi [main.startup_event:50]: Login cookies file was found, setting working mode to use account!
2021-02-19 19:42:25,662 [INFO] uvicorn.error [on.startup:38]: Application startup complete.
2021-02-19 19:42:25,663 [INFO] uvicorn.error [server.startup:166]: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
2021-02-19 19:42:48,211 [ERROR] asyncio [base_events.default_exception_handler:1738]: Task exception was never retrieved
future: <Task finished name='Task-6' coro=<Connection.run() done, defined at e:\priv_projects\facebook2rss\.venv\lib\site-packages\playwright\_impl\_connection.py:136> exception=NotImplementedError()>
Traceback (most recent call last):
File "e:\priv_projects\facebook2rss\.venv\lib\site-packages\playwright\_impl\_connection.py", line 139, in run
await self._transport.run()
File "e:\priv_projects\facebook2rss\.venv\lib\site-packages\playwright\_impl\_transport.py", line 56, in run
proc = await asyncio.create_subprocess_exec(
File "c:\python39\lib\asyncio\subprocess.py", line 236, in create_subprocess_exec
transport, protocol = await loop.subprocess_exec(
File "c:\python39\lib\asyncio\base_events.py", line 1661, in subprocess_exec
transport = await self._make_subprocess_transport(
File "c:\python39\lib\asyncio\base_events.py", line 493, in _make_subprocess_transport
raise NotImplementedError
NotImplementedError
$ uvicorn facebook_rss.main:api --loop asyncio 2021-02-19 19:42:25,659 [INFO] uvicorn.error [server.serve:63]: Started server process [28276] 2021-02-19 19:42:25,660 [INFO] uvicorn.error [on.startup:26]: Waiting for application startup. 2021-02-19 19:42:25,661 [INFO] fastapi [main.startup_event:44]: Performing startup tasks... 2021-02-19 19:42:25,662 [INFO] fastapi [main.startup_event:50]: Login cookies file was found, setting working mode to use account! 2021-02-19 19:42:25,662 [INFO] uvicorn.error [on.startup:38]: Application startup complete. 2021-02-19 19:42:25,663 [INFO] uvicorn.error [server.startup:166]: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) 2021-02-19 19:42:48,211 [ERROR] asyncio [base_events.default_exception_handler:1738]: Task exception was never retrieved future: <Task finished name='Task-6' coro=<Connection.run() done, defined at e:\priv_projects\facebook2rss\.venv\lib\site-packages\playwright\_impl\_connection.py:136> exception=NotImplementedError()> Traceback (most recent call last): File "e:\priv_projects\facebook2rss\.venv\lib\site-packages\playwright\_impl\_connection.py", line 139, in run await self._transport.run() File "e:\priv_projects\facebook2rss\.venv\lib\site-packages\playwright\_impl\_transport.py", line 56, in run proc = await asyncio.create_subprocess_exec( File "c:\python39\lib\asyncio\subprocess.py", line 236, in create_subprocess_exec transport, protocol = await loop.subprocess_exec( File "c:\python39\lib\asyncio\base_events.py", line 1661, in subprocess_exec transport = await self._make_subprocess_transport( File "c:\python39\lib\asyncio\base_events.py", line 493, in _make_subprocess_transport raise NotImplementedError NotImplementedError
Alright. I will have to try on windows myself :)
After some search, apparently, this issue is a result of conflict between uvicorn and playwright on Windows because of asyncio event loop. https://github.com/tiangolo/fastapi/issues/964 https://stackoverflow.com/questions/60071692/asyncio-create-subprocess-exec-notimplementederror-fastapi-background-task
When I try make rss from https://www.facebook.com/piwapodwiaduktem/
I got:
Browser shows nothing - no response is received. Whatever is causing this error, it would be nice to see at least a status 500.