Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error for images: 'MediaManager' object has no attribute 'syncDelete'. #52

Closed
red5247 opened this issue Apr 6, 2020 · 5 comments
Closed
Assignees
Labels
bug Something isn't working high priotiy

Comments

@red5247
Copy link

red5247 commented Apr 6, 2020

Hi,

Just started using this and love it! Everything works great except the images in my google doc don't come through. I get this error: 'MediaManager' object has no attribute 'syncDelete'. I imagine I'm missing something obvious, but I can't figure out what it is. Thanks
image

@c-okelly
Copy link
Owner

c-okelly commented Apr 6, 2020

That is a strange error. Could you share the Google Doc with me so I can have a look and try an replicate?

I do don't want to post it publicly you can email me okellyconor at gmail.com

@c-okelly
Copy link
Owner

c-okelly commented Apr 7, 2020

ok I'm able to replicate the error. It appears my add on no longer works on the latest version of Anki which is annoying.

I will investigate and roll our a fix

@c-okelly c-okelly self-assigned this Apr 7, 2020
@c-okelly c-okelly added bug Something isn't working high priotiy labels Apr 7, 2020
@c-okelly
Copy link
Owner

c-okelly commented Apr 7, 2020

One of the hooks I was using to add media to Anki has changed so will required updates.

The number of changes in the last few versions and how few hooks there are is worrying. I will try and have this fix done tomorrow

@c-okelly
Copy link
Owner

c-okelly commented Apr 7, 2020

Following code does seem to work. I'm still testing backward compatibility though

    def some_function(filename):
        try:
            self.media().syncDelete(filename)
        except AttributeError:
            self.media().trash_files([filename])

@c-okelly
Copy link
Owner

c-okelly commented Apr 8, 2020

Issue should be resolved in the latest version v1.5.2. Just released

@c-okelly c-okelly closed this as completed Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priotiy
Projects
None yet
Development

No branches or pull requests

2 participants