Git Product home page Git Product logo

Comments (6)

idlesign avatar idlesign commented on August 25, 2024

Unfortunatelly I do not use Windows, and can be little of help.
First check the supplied path is correct (I expect to see backslashes on Windows ).
To investigate it further you may want to set a breakpoint on line 410 and see what's in target_files.

from torrentool.

Lumen-git avatar Lumen-git commented on August 25, 2024

Windows can recognize either slash in a path. Running through the debugger, target_files becomes an empty list by the time the program hits line 357 in torrent.py

from torrentool.

idlesign avatar idlesign commented on August 25, 2024

Check whether file is empty. Empty files are skipped.

from torrentool.

Lumen-git avatar Lumen-git commented on August 25, 2024

That'd be it. What's the move for not having it crash the whole program on an empty file? A try/except?

from torrentool.

idlesign avatar idlesign commented on August 25, 2024

We probably need to handle IndexError on line 410.

There're two ways:

  1. Just ignore it. But that would probably produce an invalid torrent file (we'll need to check that using come torrent client, e.g. Transmission).
  2. Wrap it into TorrentError with a more user friendly description, like "Unable to create a torrent for empty file."

The 2nd seems to me more appropriate. If so, yes, try/except is to be used.

from torrentool.

idlesign avatar idlesign commented on August 25, 2024

Since 1.1.0 TorrentError is raised with a more proper description.

Considered closed.
Feel free to reopen if required.

from torrentool.

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.