Giter Site home page Giter Site logo

Comments (4)

Rascalov avatar Rascalov commented on June 26, 2024

Thank you for the report!
Interesting, I did not have success in reproducing the bug. I attached a gif of the steps I took, let me know if that differs from how you came across this error.
output

I also tried deleting the media after and then previewing and adding the audio to a different card, but that also did not produce an error.
It could also be a windows specific error since Linux and Windows might have different rules for os.rename. I'll have to test it on a Windows machine at some point.

from anki-simple-forvo-audio.

Expertium avatar Expertium commented on June 26, 2024

Hm, strange. Either there is some other condition for this bug to appear, or this is Windows-specific, as you said.

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on June 26, 2024

I'm betting on windows-specific, doesn't mean I won't address it of course :3
Just to be safe, I assume you have been able to reproduce the bug with the steps that you outlined for me?

from anki-simple-forvo-audio.

Rascalov avatar Rascalov commented on June 26, 2024

It seems I should have just looked up the method on the documentation
https://docs.python.org/3/library/os.html#os.rename

On Windows, if dst exists a FileExistsError is always raised. The operation may fail if src and dst are on different filesystems.

so I should probably change it to os.replace() , which would silently overwrite the existing file (same behavior as Unix's os.rename())

from anki-simple-forvo-audio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.