我从未创建过一个元组,并且在第一次运行时一切都很好,但是随后以某种方式创建了一个元组而不是cc,这使所有内容崩溃了
我不断收到错误消息:
public class Program
{
private static IGDriveApiV3Wrapper _gDriveApiV3Wrapper;
private readonly string _gDriveUploadDestinationFolderId;
public Program(IGDriveApiV3Wrapper gDriveApiV3Wrapper, string gDriveUploadDestinationFolderId = null)
{
_gDriveApiV3Wrapper = gDriveApiV3Wrapper;
_gDriveUploadDestinationFolderId = gDriveUploadDestinationFolderId;
}
public string Upload(string filePath)
{
string fileId = _gDriveApiV3Wrapper.UploadFile(filePath, _gDriveUploadDestinationFolderId);
_gDriveApiV3Wrapper.SetFilePermissions(fileId, GDriveFileRole.Reader, GDriveFileType.Anyone);
GDriveFile gDriveFile = _gDriveApiV3Wrapper.GetFileInfo(fileId);
return gDriveFile.WebViewLink;
}
}
很明显,这不是我的完整代码,但是失败在这部分中,所以 这是我的代码,希望您能找到它,但我不知道为什么它说有一个元组,但我从未对此表示感谢。
Exception in thread Thread-3:
Traceback (most recent call last):
File "", line 926, in _bootstrap_inner
self.run()
File "", line 401, in run
mixer.music.load(playlist[cc])
TypeError: list indices must be integers or slices, not tuple