Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我代码运行过程中出现了错误 #9

Open
smallkaka opened this issue Dec 12, 2022 · 1 comment
Open

我代码运行过程中出现了错误 #9

smallkaka opened this issue Dec 12, 2022 · 1 comment

Comments

@smallkaka
Copy link

raise IndexError('index {} is out of range'.format(idx))
IndexError: index 1 is out of range

出现问题的地方实在container.py中:
def _get_abs_string_index(self, idx):
"""Get the absolute index for the list of modules"""
idx = operator.index(idx)
print(idx)
if not (-len(self) <= idx < len(self)):#这里
raise IndexError('index {} is out of range'.format(idx))
if idx < 0:
idx += len(self)
return str(idx)

@JoeGue
Copy link
Collaborator

JoeGue commented Jan 4, 2023

你好,你这里展示的是底层代码,看起来像是数据加载过程中没有读到数据,请检查读取数据的地址是否正确

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants