UltimaScraper icon indicating copy to clipboard operation
UltimaScraper copied to clipboard

AttributeError: 'str' object has no attribute 'get'

Open maxxxter opened this issue 2 years ago • 15 comments

Type: Profile Type: Stories Traceback (most recent call last): File "D:\OnlyFans-7.6.1\start_ofd.py", line 104, in asyncio.run(main()) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "D:\OnlyFans-7.6.1\start_ofd.py", line 86, in main api = await main_datascraper.start_datascraper( File "D:\OnlyFans-7.6.1\datascraper\main_datascraper.py", line 94, in start_datascraper await main_helper.process_names( File "D:\OnlyFans-7.6.1\helpers\main_helper.py", line 966, in process_names result = await module.start_datascraper(authed, username, site_name) File "D:\OnlyFans-7.6.1\modules\onlyfans.py", line 161, in start_datascraper await prepare_scraper(authed, site_name, item) File "D:\OnlyFans-7.6.1\modules\onlyfans.py", line 784, in prepare_scraper highlights = await subscription.get_highlights() File "D:\OnlyFans-7.6.1\apis\onlyfans\classes\create_user.py", line 270, in get_highlights results = [create_highlight(x) for x in results] File "D:\OnlyFans-7.6.1\apis\onlyfans\classes\create_user.py", line 270, in results = [create_highlight(x) for x in results] File "D:\OnlyFans-7.6.1\apis\onlyfans\classes\create_highlight.py", line 3, in init self.id: int = option.get("id") AttributeError: 'str' object has no attribute 'get'

tried updating as suggested in another post, didn't help

tqdm Version: 4.64.0

maxxxter avatar Jul 26 '22 10:07 maxxxter

worked great as recently as a few days ago, nothing on my end has changed that I know of.

maxxxter avatar Jul 26 '22 10:07 maxxxter

bump, seeing the same thing.

one of the api calls is returning a 400 now:

image

Yep getting the same error. Was working fine several days ago.

dmingledorff avatar Jul 26 '22 18:07 dmingledorff

This update below should fix the issue. It was caused by onlyfans changing part of their website. anonfiles.com/G1lcNf06yf/OnlyfansDL_Devbuild_exe

Why is that an executable?

dmingledorff avatar Jul 27 '22 00:07 dmingledorff

This update below should fix the issue. It was caused by onlyfans changing part of their website. anonfiles.com/G1lcNf06yf/OnlyfansDL_Devbuild_exe

Why is that an executable?

reported @ewhgae457yaefgae4 for dodgy behavior. ignore this fool.

error is related to getting "highlights," so just commented out the call and it's working as usual

image

error is related to getting "highlights," so just commented out the call and it's working as usual

image

Thank you so much for posting this!!

skrrrtloder avatar Jul 28 '22 03:07 skrrrtloder

error is related to getting "highlights," so just commented out the call and it's working as usual

image

You're awesome, Thanks!! I suspected this due to error indications with another scraper, but being a laymen, had no idea what to do about it.

maxxxter avatar Jul 29 '22 02:07 maxxxter

error is related to getting "highlights," so just commented out the call and it's working as usual

image

thanks

Kokoraky avatar Jul 29 '22 08:07 Kokoraky

Thanks for the tip!

mbiasetti avatar Jul 29 '22 15:07 mbiasetti

I'm having a similar issue. I'm running in docker, and i tried whats-happening-rightnows tip but still getting a similar error even after commenting out the highlights code:

Traceback (most recent call last): File "/usr/src/app/./start_ofd.py", line 104, in asyncio.run(main()) File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run return loop.run_until_complete(main) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete return future.result() File "/usr/src/app/./start_ofd.py", line 86, in main api = await main_datascraper.start_datascraper( File "/usr/src/app/datascraper/main_datascraper.py", line 94, in start_datascraper await main_helper.process_names( File "/usr/src/app/helpers/main_helper.py", line 966, in process_names result = await module.start_datascraper(authed, username, site_name) File "/usr/src/app/modules/onlyfans.py", line 161, in start_datascraper await prepare_scraper(authed, site_name, item) File "/usr/src/app/modules/onlyfans.py", line 784, in prepare_scraper highlights = await subscription.get_highlights() File "/usr/src/app/apis/onlyfans/classes/create_user.py", line 270, in get_highlights results = [create_highlight(x) for x in results] File "/usr/src/app/apis/onlyfans/classes/create_user.py", line 270, in results = [create_highlight(x) for x in results] File "/usr/src/app/apis/onlyfans/classes/create_highlight.py", line 3, in init self.id: int = option.get("id") AttributeError: 'str' object has no attribute 'get'

Curiocase avatar Aug 03 '22 15:08 Curiocase

disregard my comment. I'm an idiot and didn't rebuild the scraper in docker after making the changes

Curiocase avatar Aug 03 '22 20:08 Curiocase

has this been fixed in a recent commit? @Curiocase how did you fix this with docker?

anon767346 avatar Aug 08 '22 16:08 anon767346

has this been fixed in a recent commit? @Curiocase how did you fix this with docker?

You can just open onlyfans.py in Notepad++ and edit it then save your edit and it will work.

LP560 avatar Aug 09 '22 03:08 LP560

@anon767346 I used @whats-happening-rightnow method to fix, just with docker, it appears that another step is necessary. I'm not super savvy with this stuff, and am only basing this off of how i interpreted the situation, but running the scraper in docker, the settings from onlyfans.py were locked in from when i first set it up, so any changes in onlyfans.py after the fact wouldn't take effect(again my interpretation from a person who is NOT an expert), so for the changes to take effect, it made sense for me to rebuild the scraper in docker. to do so, navigate to the scrapers main folder and run in powershell: docker build -t only-fans .

I did run into a separate unrelated issue, but once fixed that issue, i had no problems running the scraper as normal. I hope that helps

Curiocase avatar Aug 30 '22 15:08 Curiocase

Can someone please explain to me how to "Comment" (as the solution from [whats-happening-rightnow] says) ?

I am an absolute noob when it comes to code so anything would be helpful, thanks!

Razhnhake avatar Jan 13 '23 15:01 Razhnhake