user234683 / youtube-local

browser-based client for watching Youtube anonymously and with greater page performance
GNU Affero General Public License v3.0
501 stars 62 forks source link

500 Uncaught exception when importing from youtube csv #113

Closed SlyOwn closed 2 years ago

SlyOwn commented 2 years ago

Hello, I followed the github explanation to import subscribes from youtube csv then it wrote on a blank page: 403 Forbidden

the when I refresh it does that:

500 Uncaught exception: Traceback (most recent call last): File "/home/daniel/.local/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/home/daniel/.local/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/daniel/.local/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/home/daniel/.local/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(req.view_args) File "/home/daniel/youtube-local-2.7.1/youtube/channel.py", line 330, in get_toplevel_custom_page return get_channel_page_general_url('https://www.youtube.com/' + custom, tab, request) File "/home/daniel/youtube-local-2.7.1/youtube/channel.py", line 271, in get_channel_page_general_url util.check_gevent_exceptions(tasks) File "/home/daniel/youtube-local-2.7.1/youtube/util.py", line 590, in check_gevent_exceptions raise task.exception File "src/gevent/greenlet.py", line 906, in gevent._gevent_cgreenlet.Greenlet.run File "/home/daniel/youtube-local-2.7.1/youtube/channel.py", line 186, in get_number_of_videos_general return get_number_of_videos_channel(get_channel_id(base_url)) File "/home/daniel/.local/lib/python3.8/site-packages/cachetools/func.py", line 61, in wrapper v = func(args, kwargs) File "/home/daniel/youtube-local-2.7.1/youtube/channel.py", line 178, in get_channel_id response = util.fetch_url(base_url + '/about?pbj=1', headers_mobile, File "/home/daniel/youtube-local-2.7.1/youtube/util.py", line 347, in fetch_url raise FetchError(str(response.status), reason=response.reason, youtube.util.FetchError: HTTP error during request: 404 Not Found


when i try to change settings i get:

403 Forbidden

and it doesn't save

user234683 commented 2 years ago

Are you using localhost:8080 for the url or something else?

SlyOwn commented 2 years ago

no i have no gui on the computer where it is installed, i use it with allow_foreign_addresses

url is like http://192.168.1.54:8080/https://youtube.com 192.168.1.54 being the ip of the computer where it is installed

i can watch videos but i cant change settings or import or subscribe, i get 403 Forbidden

user234683 commented 2 years ago

You also need allow_foreign_post_requests = True

SlyOwn commented 2 years ago

You also need allow_foreign_post_requests = True

yes I did!

user234683 commented 2 years ago

Make sure you restart the server after changing the settings from settings.txt. Make sure you are changing settings.txt and not settings.py. Make sure that the file does not have allow_foreign_post_requests = False somewhere else. Make sure there is no typo in the name for the setting (if there is, the console will say the setting was ignored). Make sure you are changing the right file. One way to test this is to change the route_tor setting and make sure that the console output is changed.

SlyOwn commented 2 years ago

Oh thanks!

settings.txt is for portable mode so I thought i didn't wanted the portable mode but when i created this file everything worked!

thank you!