Comments (6)
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.
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.
Check whether file is empty. Empty files are skipped.
from torrentool.
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.
We probably need to handle IndexError on line 410.
There're two ways:
- 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).
- 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.
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)
- Misprint? HOT 2
- does not work with magnet link? HOT 6
- Permitions help. HOT 2
- Can't mix strings and bytes in path components [RUS] HOT 2
- Valid torrent file trips up torrentool (and other python torrent libraries) HOT 7
- Improve bencode speed HOT 4
- if file name have some strings samewith path, it will be delete HOT 3
- condition never meets HOT 1
- Update open trackes files
- I got a wrong value of info_hash from a torrent file HOT 2
- Missing properties: "source" HOT 4
- IndexError: pop from empty list HOT 6
- AttributeError when trying to set files property on Torrent object HOT 6
- Incorrectly parsed Unicode char HOT 3
- source tag is not added to the torrent? HOT 3
- Some torrent files cannot be read correctly HOT 4
- Feature request HOT 9
- CLI does not work in windows HOT 5
- Use namedtuple for Torrent.files
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torrentool.