open-mmlab / mmaction2

OpenMMLab's Next Generation Video Understanding Toolbox and Benchmark
https://mmaction2.readthedocs.io
Apache License 2.0
4.31k stars 1.25k forks source link

[Bug] resize_videos.py : get invalid literal for int() with base 10: '' #2814

Open automatic114 opened 7 months ago

automatic114 commented 7 months ago

Branch

main branch (1.x version, such as v1.0.0, or dev-1.x branch)

Prerequisite

Environment

packages in environment at /home/user/anaconda3/envs/openmmlab:

#

Name Version Build Channel

_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
addict 2.4.0 pypi_0 pypi aliyun-python-sdk-core 2.15.0 pypi_0 pypi aliyun-python-sdk-kms 2.16.2 pypi_0 pypi attrs 23.2.0 pypi_0 pypi blas 1.0 mkl
brotli-python 1.0.9 py38hfa26641_7 conda-forge bzip2 1.0.8 h5eee18b_5
ca-certificates 2024.2.2 hbcca054_0 conda-forge certifi 2024.2.2 pyhd8ed1ab_0 conda-forge cffi 1.16.0 pypi_0 pypi charset-normalizer 2.0.4 pyhd3eb1b0_0
chumpy 0.70 pypi_0 pypi click 8.1.7 pypi_0 pypi colorama 0.4.6 pypi_0 pypi contourpy 1.1.1 pypi_0 pypi coverage 7.4.4 pypi_0 pypi crcmod 1.7 pypi_0 pypi cryptography 42.0.5 pypi_0 pypi cuda-cudart 11.7.99 0 nvidia cuda-cupti 11.7.101 0 nvidia cuda-libraries 11.7.1 0 nvidia cuda-nvrtc 11.7.99 0 nvidia cuda-nvtx 11.7.91 0 nvidia cuda-runtime 11.7.1 0 nvidia cycler 0.12.1 pypi_0 pypi cython 3.0.9 pypi_0 pypi decord 0.6.0 pypi_0 pypi einops 0.7.0 pypi_0 pypi exceptiongroup 1.2.0 pypi_0 pypi ffmpeg 1.4 pypi_0 pypi flake8 7.0.0 pypi_0 pypi fonttools 4.50.0 pypi_0 pypi freetype 2.12.1 h4a9f257_0
gmp 6.2.1 h295c915_3
gnutls 3.6.15 he1e5248_0
idna 3.4 py38h06a4308_0
importlib-metadata 7.0.2 pypi_0 pypi importlib-resources 6.3.1 pypi_0 pypi iniconfig 2.0.0 pypi_0 pypi intel-openmp 2023.1.0 hdb19cb5_46306
interrogate 1.5.0 pypi_0 pypi isort 4.3.21 pypi_0 pypi jmespath 0.10.0 pypi_0 pypi joblib 1.3.2 pypi_0 pypi jpeg 9e h5eee18b_1
json-tricks 3.17.3 pypi_0 pypi kiwisolver 1.4.5 pypi_0 pypi lame 3.100 h7b6447c_0
lap 0.4.0 pypi_0 pypi lcms2 2.12 h3be6417_0
ld_impl_linux-64 2.38 h1181459_1
lerc 3.0 h295c915_0
libcublas 11.10.3.66 0 nvidia libcufft 10.7.2.124 h4fbf590_0 nvidia libcufile 1.9.0.20 0 nvidia libcurand 10.3.5.119 0 nvidia libcusolver 11.4.0.1 0 nvidia libcusparse 11.7.4.91 0 nvidia libdeflate 1.17 h5eee18b_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libiconv 1.16 h7f8727e_2
libidn2 2.3.4 h5eee18b_0
libnpp 11.7.4.75 0 nvidia libnvjpeg 11.8.0.2 0 nvidia libopus 1.3.1 h7f98852_1 conda-forge libpng 1.6.39 h5eee18b_0
libstdcxx-ng 11.2.0 h1234567_1
libtasn1 4.19.0 h5eee18b_0
libtiff 4.5.1 h6a678d5_0
libunistring 0.9.10 h27cfd23_0
libvpx 1.7.0 h439df22_0
libwebp-base 1.3.2 h5eee18b_0
lz4-c 1.9.4 h6a678d5_0
markdown 3.6 pypi_0 pypi markdown-it-py 3.0.0 pypi_0 pypi mat4py 0.6.0 pypi_0 pypi matplotlib 3.7.5 pypi_0 pypi mccabe 0.7.0 pypi_0 pypi mdurl 0.1.2 pypi_0 pypi mkl 2023.1.0 h213fc3f_46344
mkl-service 2.4.0 py38h5eee18b_1
mkl_fft 1.3.8 py38h5eee18b_0
mkl_random 1.2.4 py38hdb19cb5_0
mmaction2 1.2.0 dev_0 mmcv 2.1.0 pypi_0 pypi mmdet 3.3.0 dev_0 mmengine 0.10.3 pypi_0 pypi mmpose 1.3.1 dev_0 mmpretrain 1.2.0 pypi_0 pypi model-index 0.1.11 pypi_0 pypi modelindex 0.0.2 pypi_0 pypi motmetrics 1.4.0 pypi_0 pypi munkres 1.1.4 pypi_0 pypi ncurses 6.4 h6a678d5_0
nettle 3.7.3 hbbd107a_1
numpy 1.23.5 pypi_0 pypi numpy-base 1.24.3 py38h060ed82_1
opencv-contrib-python 4.9.0.80 pypi_0 pypi opencv-python 4.9.0.80 pypi_0 pypi opendatalab 0.0.10 pypi_0 pypi openh264 2.1.1 h4ff587b_0
openjpeg 2.4.0 h3ad879b_0
openmim 0.3.9 pypi_0 pypi openssl 3.0.13 h7f8727e_0
openxlab 0.0.37 pypi_0 pypi ordered-set 4.1.0 pypi_0 pypi oss2 2.17.0 pypi_0 pypi packaging 24.0 pypi_0 pypi pandas 2.0.3 pypi_0 pypi parameterized 0.9.0 pypi_0 pypi pillow 10.2.0 py38h5eee18b_0
pip 23.3.1 py38h06a4308_0
platformdirs 4.2.0 pypi_0 pypi pluggy 1.4.0 pypi_0 pypi py 1.11.0 pypi_0 pypi pycocotools 2.0.7 pypi_0 pypi pycodestyle 2.11.1 pypi_0 pypi pycparser 2.21 pypi_0 pypi pycryptodome 3.20.0 pypi_0 pypi pyflakes 3.2.0 pypi_0 pypi pygments 2.17.2 pypi_0 pypi pyparsing 3.1.2 pypi_0 pypi pysocks 1.7.1 pyha2e5f31_6 conda-forge pytest 8.1.1 pypi_0 pypi pytest-runner 6.0.1 pypi_0 pypi python 3.8.18 h955ad1f_0
python-dateutil 2.9.0.post0 pypi_0 pypi python_abi 3.8 2_cp38 conda-forge pytorch 1.13.0 py3.8_cuda11.7_cudnn8.5.0_0 pytorch pytorch-cuda 11.7 h778d358_5 pytorch pytorch-mutex 1.0 cuda pytorch pytz 2023.4 pypi_0 pypi pyyaml 6.0.1 pypi_0 pypi readline 8.2 h5eee18b_0
requests 2.28.2 pypi_0 pypi rich 13.4.2 pypi_0 pypi scikit-learn 1.3.2 pypi_0 pypi scipy 1.10.1 pypi_0 pypi seaborn 0.13.2 pypi_0 pypi setuptools 60.2.0 pypi_0 pypi shapely 2.0.3 pypi_0 pypi six 1.16.0 pypi_0 pypi sqlite 3.41.2 h5eee18b_0
tabulate 0.9.0 pypi_0 pypi tbb 2021.8.0 hdb19cb5_0
termcolor 2.4.0 pypi_0 pypi terminaltables 3.1.10 pypi_0 pypi threadpoolctl 3.3.0 pypi_0 pypi tk 8.6.12 h1ccaba5_0
toml 0.10.2 pypi_0 pypi tomli 2.0.1 pypi_0 pypi torchaudio 0.13.0 py38_cu117 pytorch torchvision 0.14.0 py38_cu117 pytorch tqdm 4.65.2 pypi_0 pypi trackeval 1.0.dev1 pypi_0 pypi typing_extensions 4.9.0 py38h06a4308_1
tzdata 2024.1 pypi_0 pypi urllib3 1.26.18 pypi_0 pypi wheel 0.41.2 py38h06a4308_0
x264 1!157.20191217 h7b6447c_0
xdoctest 1.1.3 pypi_0 pypi xmltodict 0.13.0 pypi_0 pypi xtcocotools 1.14.3 pypi_0 pypi xz 5.4.6 h5eee18b_0
yapf 0.40.2 pypi_0 pypi zipp 3.18.1 pypi_0 pypi zlib 1.2.13 h5eee18b_0
zstd 1.5.5 hc292b87_0

Describe the bug

I am resizing the kinetics400 dataset, the error is raised suddenly. According to the ValueError, it should be a missing char to cause the int convrting error, but the dataset videos can be played normaly.

Reproduces the problem - code sample

No response

Reproduces the problem - command or script

No response

Reproduces the problem - error message

""" Traceback (most recent call last): File "/home/user/anaconda3/envs/openmmlab/lib/python3.8/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, *kwds)) File "/home/user/anaconda3/envs/openmmlab/lib/python3.8/multiprocessing/pool.py", line 48, in mapstar return list(map(args)) File "../resize_videos.py", line 36, in resize_videos w, h = [int(d) for d in result.readline().rstrip().split(',')] File "../resize_videos.py", line 36, in w, h = [int(d) for d in result.readline().rstrip().split(',')] ValueError: invalid literal for int() with base 10: '' """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "../resize_videos.py", line 122, in pool.map(resize_videos, zip(fullpath_list, vid_list)) File "/home/user/anaconda3/envs/openmmlab/lib/python3.8/multiprocessing/pool.py", line 364, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/home/user/anaconda3/envs/openmmlab/lib/python3.8/multiprocessing/pool.py", line 771, in get raise self._value ValueError: invalid literal for int() with base 10: ''

Additional information

No response

automatic114 commented 7 months ago

After I tested on some filefolders separately, there are some videos in dataset that indeed have some malfunctions.