Coder Social home page Coder Social logo

Comments (6)

gilesknap avatar gilesknap commented on September 26, 2024

Hmmm this is an interesting one that I have not seen.

May be a little challenging for me to debug without being able to reproduce it myself, so if you can investigate that would be great.

Thanks for the report.

from gphotos-sync.

peterjdolan avatar peterjdolan commented on September 26, 2024

FYI I've narrowed this down to how an exception in the file download flow is handled, which I think will be a terribly rare situation.

Specifically, the call to os.utime at

fails on my system because I'm running with a mounted SMB share, and the server doesn't allow the file attributes to be modified.

When an exception is thrown at that line, the download task times out (TimeoutException at

e = future.exception(timeout=timeout)
), at which point the database connection is already closed, and the program reaches a deadlock state and fails to exit.

I haven't been able to write a unit test to expose this because my local development environment is a bit messy, but I'll keep working on it. In the meantime, I'll just change the mounted filesystem to make it work.

from gphotos-sync.

gilesknap avatar gilesknap commented on September 26, 2024

Thanks @peterjdolan I figure I just need to trap that exception - can't do much but ignore it I guess.

from gphotos-sync.

peterjdolan avatar peterjdolan commented on September 26, 2024

Agreed. I'm honestly not sure why it isn't already being caught, but it's not.

When I added a second general "except Exception" clause, it worked as expected.

I'm also not sure why the existing unit tests don't cover this. On my reading, they should.

from gphotos-sync.

gilesknap avatar gilesknap commented on September 26, 2024

@peterjdolan did you detect what the exception was that was thrown?
I'm only checking for PermissionError on that call.

I'm making a pr #499 that might help because it makes sure the thread is cleaned up when it throws an unexpected exception. But it would be nicer to trap your error lower down.

from gphotos-sync.

gilesknap avatar gilesknap commented on September 26, 2024

Please try out 3.2.5 when it is released and see if this fixes your issue.

from gphotos-sync.

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.