Skip to content
This repository has been archived by the owner on Nov 25, 2023. It is now read-only.

Scraper fails when attempting to download an asset from the user running the script #1016

Open
testtest1231234 opened this issue Jun 30, 2023 · 2 comments

Comments

@testtest1231234
Copy link

When assets are pulled the script attempts to get the models data associated with an asset in the ReformatManager class.

class ReformatManager:
...
    def prepare_reformat(self, media_item: MediaMetadata):
...
        # This is the method call that is that's failing since the author.id cannot be found in the `directory_manager_users` map
        download_path = self.filesystem_manager.get_directory_manager(
            author.id
        ).root_download_directory 
...

However it does not take into account that an asset can be owned by the user running the script, so an error occurs when attempting to find the author id in directory_manager_users.

For example, if the user sends a gif to a model, it is retrieved as an asset when scraping data and we run into the exception.

Forgive me for the poor formatting, I don't usually write Python so I'm not familiar with conventions for specifying files/classes/methods

@testtest1231234
Copy link
Author

Fixing the above issue should also fix these issues:
UltimaHoarder/UltimaScraperAPI#11
#1010
#1008 (comment)
#1004

@otisrush
Copy link

Can confirm this is the case for me for every model I have sent anything to.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants