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

AttributeError: 'NoneType' object has no attribute 'group' when using remote gif URL #18

Open
ghost opened this issue Jul 7, 2018 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Jul 7, 2018

I had the same issue detailed in issue 7 and on deleting the directory specified got the following regex exception instead:

$ gif-for-cli 10988977

Traceback (most recent call last):
File "/home/me/envs/terminal/bin/gif-for-cli", line 11, in
sys.exit(main())
File "/home/me/envs/terminal/lib/python3.6/site-packages/gif_for_cli/main.py", line 105, in main
execute(os.environ, sys.argv[1:], sys.stdout)
File "/home/me/envs/terminal/lib/python3.6/site-packages/gif_for_cli/main.py", line 72, in execute
cpu_pool_size=args.cpu_pool_size,
File "/home/me/envs/terminal/lib/python3.6/site-packages/gif_for_cli/generate/init.py", line 170, in generate
num_frames, seconds = _run_ffmpeg(*options)
File "/home/me/envs/terminal/lib/python3.6/site-packages/gif_for_cli/generate/init.py", line 73, in _run_ffmpeg
num_frames = int(re.search(r'frame=\s
(\d+)', err).group(1))
AttributeError: 'NoneType' object has no attribute 'group'

python3.6 on debian 8.0

@ghost
Copy link
Author

ghost commented Jul 7, 2018

Should point out, works fine on local gifs.

@SeanHayes
Copy link
Contributor

That means something went wrong with ffmpeg, and it's not giving the output we expect.

What version of ffmpeg are you using?

@ghost
Copy link
Author

ghost commented Jul 8, 2018

Yes you're right, it was only affecting HTTPS connections. Adding --enable-openssl when configuring FFMPEG fixed.

$ ffmpeg -version
ffmpeg version 2.7.2 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10+deb8u1)
configuration: --enable-gpl --enable-postproc --enable-swscale --enable-avfilter --enable-libmp3lame
libavutil      54. 27.100 / 54. 27.100
libavcodec     56. 41.100 / 56. 41.100
libavformat    56. 36.100 / 56. 36.100
libavdevice    56.  4.100 / 56.  4.100
libavfilter     5. 16.101 /  5. 16.101
libswscale      3.  1.101 /  3.  1.101
libswresample   1.  2.100 /  1.  2.100
libpostproc    53.  3.100 / 53.  3.100

@ghost ghost closed this as completed Jul 8, 2018
@SeanHayes
Copy link
Contributor

SeanHayes commented Jul 9, 2018

I'll reopen this, gif-for-cli should handle this error better and try to warn the user ffmpeg needs to be reconfigured.

Thanks for your help!

@SeanHayes SeanHayes reopened this Jul 9, 2018
@SeanHayes SeanHayes self-assigned this Jul 16, 2018
@SeanHayes SeanHayes added the bug Something isn't working label Jul 16, 2018
@dtantsur
Copy link

The same happens with local paths and --export key (which is broken anyway, but still).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants