ludoux / qbittorrent-torrents-exporter

qBittorrent 种子文件导出小工具 | Export torrent files from BT_backup and append "missing" trackers.
GNU General Public License v3.0
131 stars 1 forks source link

panic: runtime error: index out of range [0] with length 0错误 #5

Closed Hbxycch closed 2 years ago

Hbxycch commented 2 years ago

`PS E:\exporter> .\qbittorrent-torrents-exporter.exe -qh "http://192.168.6.250:8383" -qu "admin" -qp "666666" github.com/ludoux/qbittorrent-torrents-exporter v0.2.1 panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]: main.genMap({0xc000012160, 0x19}, {0xc00000a0e8, 0x5}, {0xc00000a108, 0x6}) /github/workspace/main.go:138 +0xb5b main.main() /github/workspace/main.go:565 +0x45e PS E:\exporter> `

Hbxycch commented 2 years ago

E:\exporter>ll 'll' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

E:\exporter>debug1.exe -qh "http://192.168.6.250:8383" -qu "admin" -qp "666666" github.com/ludoux/qbittorrent-torrents-exporter v0.2.1 panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]: main.genMap({0xc00000c160, 0x19}, {0xc00000a108, 0x5}, {0xc00000a128, 0x6}) /home/luu/Documents/Git/qbittorrent-torrents-exporter/main.go:142 +0xb5b main.main() /home/luu/Documents/Git/qbittorrent-torrents-exporter/main.go:569 +0x45e

E:\exporter> snipaste_20220526_113316

ludoux commented 2 years ago

是不是端口打错了😀我看你浏览器是8686端口

Hbxycch commented 2 years ago

可能是我的vpn问题,正在排查,端口是我改了几次的

ludoux commented 2 years ago

我这边测试的话,假如各种原因 exporter 没法从 qB 里面拿种子列表,就会报这个错。可以试着在 qB 中把电脑主机IP开白名单(不验证密码),然后浏览器直接访问类似于 http://[qb.lan]:[port]/api/v2/torrents/info?limit=5 看看能不能拿到数据。

btw 最近我比较忙,所以假如真代码有问题估计也没法很快响应😂

Hbxycch commented 2 years ago

感谢大佬,导出成功了,是我网络问题,我是通过公网vpn导出的,另外丐帮导出会报错,用的debug版本,我把丐帮删了,已经成功导出

ludoux commented 2 years ago

丐帮导出是不是和 #4 类似,tracker 也带 | …?

Hbxycch commented 2 years ago

是的有两个||

ludoux commented 2 years ago

好的,预计下一个版本会修复tracker 带 | 导出报错的问题。 导出后记得再次检查一下 torrents 数目和 tracker 是否正确,无误再进行下一步操作,没有什么问题我就关 issue 了 :)

Hbxycch commented 2 years ago

好的,感谢大佬