UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

'NoneType' object is not iterable

Open EightDee opened this issue 5 years ago • 14 comments

Using the latest changes from a few hours ago getting a different variation of the NoneType error. Still not able to complete a run before getting this error. Causes the process to restart on ENTER

Renaming files.
Scrape Completed

Scrape Processing
Name: ninadiamondz
Type: Profile
0.00B [00:00, ?B/s]
Type: Stories
Traceback (most recent call last):
  File "Y:\Temp\Scrape\start_ofd.py", line 45, in main
    api = await main_datascraper.start_datascraper(
  File "Y:\Temp\Scrape\datascraper\main_datascraper.py", line 99, in start_datascraper
    names = await main_helper.process_names(
  File "Y:\Temp\Scrape\helpers\main_helper.py", line 693, in process_names
    result = await module.start_datascraper(authed, username, site_name)
  File "Y:\Temp\Scrape\modules\onlyfans.py", line 166, in start_datascraper
    results = await prepare_scraper(authed, site_name, item)
  File "Y:\Temp\Scrape\modules\onlyfans.py", line 781, in prepare_scraper
    master_set += await subscription.get_archived_stories()
  File "Y:\Temp\Scrape\apis\onlyfans\classes\create_user.py", line 388, in get_archived_stories
    results = [create_story(x) for x in results]
TypeError: 'NoneType' object is not iterable

EightDee avatar Jun 16 '21 19:06 EightDee

Have you blocked this model?

UltimaHoarder avatar Jun 16 '21 20:06 UltimaHoarder

No I have not

EightDee avatar Jun 16 '21 20:06 EightDee

Here is another variation of the error, I received before the last fix.

Renaming files.
Type: Archived
No Archived Found.
Type: Messages
Traceback (most recent call last):
  File "Y:\Temp\Scrape\start_ofd.py", line 45, in main
    api = await main_datascraper.start_datascraper(
  File "Y:\Temp\Scrape\datascraper\main_datascraper.py", line 104, in start_datascraper
    names = await main_helper.process_names(
  File "Y:\Temp\Scrape\helpers\main_helper.py", line 692, in process_names
    result = await module.start_datascraper(authed, username, site_name)
  File "Y:\Temp\Scrape\modules\onlyfans.py", line 172, in start_datascraper
    results = await prepare_scraper(authed, site_name, item)
  File "Y:\Temp\Scrape\modules\onlyfans.py", line 793, in prepare_scraper
    unrefined_set = await subscription.get_messages()
  File "Y:\Temp\Scrape\apis\onlyfans\classes\create_user.py", line 342, in get_messages
    has_more = results[-1]["hasMore"]
TypeError: 'NoneType' object is not subscriptable

EightDee avatar Jun 16 '21 20:06 EightDee

Are you a creator?

UltimaHoarder avatar Jun 16 '21 21:06 UltimaHoarder

Hmmm, I don't think my account is a creator account. I don't see anything in my account saying it is.

EightDee avatar Jun 16 '21 21:06 EightDee

Try latest commit

UltimaHoarder avatar Jun 16 '21 21:06 UltimaHoarder

Trying now. It will take some time to get through a run

EightDee avatar Jun 16 '21 21:06 EightDee

Haven't received the original error yet but getting the following variation. It caused a restart

.43MB/s]←[0mTraceback (most recent call last):
  File "Y:\Temp\Scrape\start_ofd.py", line 45, in main
    api = await main_datascraper.start_datascraper(
  File "Y:\Temp\Scrape\datascraper\main_datascraper.py", line 108, in start_datascraper
    await main_helper.process_downloads(api, module)
  File "Y:\Temp\Scrape\helpers\main_helper.py", line 701, in process_downloads
    await module.prepare_downloads(subscription)
  File "Y:\Temp\Scrape\modules\onlyfans.py", line 1263, in prepare_downloads
    a = await subscription.session_manager.async_downloads(
  File "Y:\Temp\Scrape\apis\api_helper.py", line 333, in async_downloads
    results = await asyncio.ensure_future(run(download_list))
  File "Y:\Temp\Scrape\apis\api_helper.py", line 328, in run
    result = await asyncio.gather(*tasks)
  File "Y:\Temp\Scrape\apis\api_helper.py", line 296, in process_download
    result = await self.download_content(
  File "Y:\Temp\Scrape\apis\api_helper.py", line 369, in download_content
    new_result = await subscription.get_post(post_id)
  File "Y:\Temp\Scrape\apis\onlyfans\classes\create_user.py", line 310, in get_post
    final_result = create_post(result, self)
  File "Y:\Temp\Scrape\apis\onlyfans\classes\create_post.py", line 9, in __init__
    self.responseType: str = option.get("responseType")
AttributeError: 'error_details' object has no attribute 'get'

EightDee avatar Jun 17 '21 12:06 EightDee

I updated with the error_details fix and trying again.

EightDee avatar Jun 17 '21 15:06 EightDee

Nope got it again. But I see there was another fix late yesterday. I'll try that

EightDee avatar Jun 18 '21 10:06 EightDee

So the second error came back. I wish it didn't take so long to get to the error. It's been running for about 6hrs before it crapped out.

Processing metadata.
Finished processing metadata.
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Renaming files.
Type: Archived
No Archived Found.
Type: Messages
Traceback (most recent call last):
  File "Y:\Temp\Scrape\start_ofd.py", line 44, in main
    api = await main_datascraper.start_datascraper(
  File "Y:\Temp\Scrape\datascraper\main_datascraper.py", line 99, in start_datascraper
    names = await main_helper.process_names(
  File "Y:\Temp\Scrape\helpers\main_helper.py", line 693, in process_names
    result = await module.start_datascraper(authed, username, site_name)
  File "Y:\Temp\Scrape\modules\onlyfans.py", line 166, in start_datascraper
    results = await prepare_scraper(authed, site_name, item)
  File "Y:\Temp\Scrape\modules\onlyfans.py", line 789, in prepare_scraper
    unrefined_set = await subscription.get_messages()
  File "Y:\Temp\Scrape\apis\onlyfans\classes\create_user.py", line 348, in get_messages
    has_more = results[-1]["hasMore"] if results else False
TypeError: 'NoneType' object is not subscriptable

EightDee avatar Jun 18 '21 17:06 EightDee

Do you have the name of the model that you was scraping that caused this error?

UltimaHoarder avatar Jun 18 '21 22:06 UltimaHoarder

Sorry no, it was outside of the console buffer.

EightDee avatar Jun 18 '21 22:06 EightDee

Sorry no, it was outside of the console buffer.

Np, you can update now and that error should be fixed.

UltimaHoarder avatar Jun 19 '21 00:06 UltimaHoarder