I am at challenge 6 and am trying to bencode the info dictionary. I have used two externals bencode libraries and both of them are failing to becode the info dictionary saying that it cannot bencode data of type float64 which is probably referring to the length of the torrent file. What am I doing wrong?
@JavaIsNotHard Could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.
Here you go
Got it! Unfortunately I may have to get back to you next week – a bit tied up this week.
Could you please just give a short answer to why the encoding is not happening?
@JavaIsNotHard We don’t have an answer yet. As @andy1li mentioned, we’ll get back next week once we’ve had time to look into this properly!
Hi @andy1li, hope you had a wonderful weekend, I was wondering if you have reviewed by code.
@JavaIsNotHard It seems that the third-party library cannot handle integer values correctly.
Try isolating the error by iterating through infoMap
:
You might want to use the bencode implementation you created in earlier stages, instead of a third party library.
Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!