[BitTorrent] HELP! "bad bencoded data" with new generated torrent

Justin Cormack justin at street-vision.com
Wed Mar 9 20:33:22 EST 2005


> 
> 
> 
> >I'm developping a torrent generator and I'm using BT 0.3.10 to test 
> >my generated files. And I'm stuck with this error.
> >
> >The generated torrent pass my bdecoder and seems normal. I've 
> >compared the Info Hash of my generated torrent with other torrent 
> >generator programs and the Info Hash matches.
> >
> >So what I could be doing wrong here?!
> >
> 
> Nearly all the problems I've seen with .torrent file generation have 
> been caused by the file being written in text mode rather than binary.  
> Make sure you open the file using "wb" rather than "w".

The above points out the fact that you havent said enough about what
you are doing - we dont know what language you are using, or OS even.
"wb" vs "w" doesnt make sense in Unix for example.

I seem to remember I had one problem the first time I implemented 
bencoding. I forget what it was, but I do remember that doing a hexdump
and comparing it against another programs output made it obvious in 
a couple of seconds - just find where your output differs.

j




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/BitTorrent/

<*> To unsubscribe from this group, send an email to:
    BitTorrent-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the BitTorrent mailing list