gpt4 book ai didi

javascript - 无效数据 : Missing delimiter ":" [0x3a] nodejs

转载 作者:行者123 更新时间:2023-12-03 00:01:30 28 4
gpt4 key购买 nike

我收到此错误:

Error: Invalid data: Missing delimiter ":" [0x3a] at Function.decode.find (/Users/Seleena/Documents/torrent/node_modules/bencode/lib/decode.js:114:9) at Function.decode.buffer (/Users/Seleena/Documents/torrent/node_modules/bencode/lib/decode.js:159:20) at Function.decode.dictionary (/Users/Seleena/Documents/torrent/node_modules/bencode/lib/decode.js:127:17) at Function.decode.next (../Documents/torrent/node_modules/bencode/lib/decode.js:94:21) at Function.decode.dictionary (../Documents/torrent/node_modules/bencode/lib/decode.js:127:36) at Function.decode.next (../Documents/torrent/node_modules/bencode/lib/decode.js:94:21) at Object.decode (../Documents/torrent/node_modules/bencode/lib/decode.js:83:17) at Object. (/Users/Seleena/Documents/torrent/index.js:5:25) at Module._compile (internal/modules/cjs/loader.js:689:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)

通过运行此代码

const fs = require('fs');
const bencode = require('bencode');
const torrent = bencode.decode(fs.readFileSync('puppy.torrent'));
console.log(torrent.announce.toString('utf8'));

这是我的 puppy.torrent 文件

d8:announce43:udp://tracker.coppersurfer.tk:6969/announce10:created by13:uTorrent/187013:creation datei1462355939e8:encoding5:UTF-84:infod6:lengthi124234e4:name9:puppy.jpg12:piece lengthi16384e6:pieces160:T�k�/�_(�S\u0011h%���+]q\'B\u0018�٠:����p"�j����1-g"\u0018�s(\u001b\u000f���V��=�h�m\u0017a�nF�2���N\r�ǩ�_�\u001e"2���\'�wO���-;\u0004ע\u0017�ؑ��L&����0\u001f�D_9��\t\\��O�h,n\u001a5g�(��仑,�\\߰�%��U��\u0019��C\u0007>��df��ee

任何人都可以向我解释为什么我会收到此错误消息以及如何修复它吗?

最佳答案

问题出在我使用的追踪器上。使用不同的跟踪器创建新的 torrent 文件后,我得到了正确的输出。

关于javascript - 无效数据 : Missing delimiter ":" [0x3a] nodejs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55150639/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com