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

TypeError: endswith first arg must be str or a tuple of str, not list #48

Open
double-fire-0 opened this issue Jul 8, 2021 · 0 comments

Comments

@double-fire-0
Copy link

File"/mnt/lustre/share/spring/conda_envs/miniconda3/envs/s0.3.3/lib/python3.6/sitepackages/torchvision/datasets/folder.py", line 19, in has_file_allowed_extension return filename.lower().endswith(extensions) TypeError: endswith first arg must be str or a tuple of str, not list

I find this error and solve this error by doing this:
Change line 18 from video_loader.py
from
super(VideoFolder, self).__init__(root, loader, ['.mp4'], transform=transform, target_transform=target_transform)
to
super(VideoFolder, self).__init__(root, loader, '.mp4', transform=transform, target_transform=target_transform)

Then the error will not occur and it works well.
I think it may be a problem about the version of torchvision.
What is your version of torchvision?
For me it is '0.6.0+cu90'

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

1 participant