UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

Account recognized but I get: TypeError: 'NoneType' object is not subscriptable

Open lanzjose opened this issue 2 years ago • 4 comments

Hi everyone! So the program recognizes my username, my subscriptions and everything. But as soon as i choosse an account to download its content, I get this error. What can be the cause?

Traceback (most recent call last): File "C:\UltimaScraper\start_us.py", line 62, in asyncio.run(main()) File "C:\Users\ME\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\ME\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete return future.result() File "C:\UltimaScraper\start_us.py", line 44, in main _api = await USR.start( File "C:\UltimaScraper\ultima_scraper\ultima_scraper.py", line 50, in start await self.start_datascraper(datascraper) File "C:\UltimaScraper\ultima_scraper\ultima_scraper.py", line 135, in start_datascraper final_job_user_list = await datascraper.configure_datascraper_jobs() File "C:\Users\ME\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-hof4bvgL-py3.10\lib\site-packages\ultima_scraper_collection\modules\module_streamliner.py", line 109, in configure_datascraper_jobs chat_users = await self.get_chat_users() File "C:\Users\ME\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-hof4bvgL-py3.10\lib\site-packages\ultima_scraper_collection\modules\module_streamliner.py", line 427, in get_chat_users chats = await authed.get_chats() File "C:\Users\ME\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-hof4bvgL-py3.10\lib\site-packages\ultima_scraper_api\apis\onlyfans\classes\auth_model.py", line 260, in get_chats result["lastMessage"] = create_message( File "C:\Users\ME\AppData\Local\pypoetry\Cache\virtualenvs\ultima-scraper-hof4bvgL-py3.10\lib\site-packages\ultima_scraper_api\apis\onlyfans\classes\message_model.py", line 14, in init author = user.get_authed().find_user_by_identifier(option["fromUser"]["id"]) TypeError: 'NoneType' object is not subscriptable PS C:\UltimaScraper>

lanzjose avatar Nov 27 '23 02:11 lanzjose

I found an old issue log which mentions disabling the messages scrap job in the config.json file.

Tested and it works for me.

felixtheant avatar Dec 28 '23 11:12 felixtheant

get sess, user agent and x-bc from firefox. Chromium ones seem to fail for some reason

Egon099 avatar Jan 21 '24 13:01 Egon099

The issue is due to the chat list limit being too large. Change the file apis\onlyfans\classes\message_model.py line 235

    async def get_chats(
        self,
        links: list[str] = [],
        limit: int = 20,
        offset: int = 0,
        depth: int = 1,
        refresh: bool = True,
    ) -> list[dict[str, Any]]:

kotori2 avatar Feb 15 '24 22:02 kotori2

The issue is due to the chat list limit being too large. Change the file apis\onlyfans\classes\message_model.py line 235

    async def get_chats(
        self,
        links: list[str] = [],
        limit: int = 20,
        offset: int = 0,
        depth: int = 1,
        refresh: bool = True,
    ) -> list[dict[str, Any]]:

I believe you meant apis\onlyfans\classes\auth_model.py

haughingtrust avatar Jun 21 '24 09:06 haughingtrust