Re: HELP! "bad bencoded data" with new generated torrent
Justin Cormack <[email protected]> Thu, 10 Mar 2005 01:33:22 +0000 (GMT)
| Newsgroups | gmane.network.bit-torrent.general |
|---|---|
| Message-ID | <[email protected]> |
>
>
>
> >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:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/