GithubHelp home page GithubHelp logo

Comments (3)

ninja33 avatar ninja33 commented on August 24, 2024

emm, I think I got the solution.
in python document 15.1. os — Miscellaneous operating system interfaces, it mentioned.

os.rename(src, dst)
Rename the file or directory src to dst. If dst is a directory, OSError will be raised. On Unix, if dst exists and is a file, it will be replaced silently if the user has permission. The operation may fail on some Unix flavors if src and dst are on different filesystems. If successful, the renaming will be an atomic operation (this is a POSIX requirement). On Windows, if dst already exists, OSError will be raised even if it is a file; there may be no way to implement an atomic rename when dst names an existing file.

so, in windows environment, a quick fix could be remove prior to the rename
in sync_app.py line 471

        # Overwrite existing db.
        col.close()
        try:
            if os.name == 'nt':
                os.remove(session.get_collection_path())
            os.rename(temp_db_path, session.get_collection_path())
        finally:
            col.reopen()

it's well done, no more error message 😄

from anki-sync-server.

bosbyj avatar bosbyj commented on August 24, 2024

Great job! It is working on my win8 platform.

from anki-sync-server.

gabriellluz avatar gabriellluz commented on August 24, 2024

Your fix worked for me, too!! Thank you.

from anki-sync-server.

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.