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: expected str, bytes or os.PathLike object, not NoneType #7

Open
girod2033 opened this issue May 19, 2021 · 4 comments
Open

Comments

@girod2033
Copy link

Hello.
I am getting an error on startup.

g:\111\mpd-content-parser>mpd_content_parser.py
Traceback (most recent call last):
File "G:\111\mpd-content-parser\mpd_content_parser.py", line 292, in
main()
File "G:\111\mpd-content-parser\mpd_content_parser.py", line 273, in main
xmlpath = Path(args.path).resolve()
File "C:\Program Files\Python37\lib\pathlib.py", line 1003, in new
self = cls._from_parts(args, init=False)
File "C:\Program Files\Python37\lib\pathlib.py", line 658, in _from_parts
drv, root, parts = self._parse_args(args)
File "C:\Program Files\Python37\lib\pathlib.py", line 642, in _parse_args
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@xhlove
Copy link
Owner

xhlove commented May 19, 2021

You should use -p option to specific the mpd file path, or use --url to specific mpd url.

or just use https://github.com/xhlove/XstreamDL-CLI

@girod2033
Copy link
Author

mpd_content_parser.py -url https://lbs-usp-dash-vod.cmore.se/vod/e56b0/oonxxb22rfd(10023265_ISMUSP).ism/oonxxb22rfd(10023265_ISMUSP).mpd

The program downloads mpd, saves it with the name "response.mpd" and nothing else.

mpd_content_parser.py -p g:\111\mpd-content-parser\response.mpd

Nothing happens.

The previous version worked successfully, starting without parameters, then I specified the path to the mpd file when the program was requested.

@xhlove
Copy link
Owner

xhlove commented May 19, 2021

bug fixed, use the latest version

@girod2033
Copy link
Author

Thanks, now the text files are being generated successfully.
But she does it two times (the cycle duplicates, the files are overwritten, I compared the time of creating the files).

g:\111\mpd-content-parser>mpd_content_parser.py -p g:\111\mpd-content-parser\res
ponse.mpd
response-1-audio_eng=93467-audio-AAC-93.47kbps.en
response-2-textstream_dan=3000-text--3.00kbps.da
response-3-textstream_fin=3000-text--3.00kbps.fi
response-4-textstream_nob=3000-text--3.00kbps.nb
response-5-textstream_swe=3000-text--3.00kbps.sv
response-6-video_eng=99000-video-H264-99.00kbps.en.128x72p
response-6-video_eng=252000-video-H264-252.00kbps.en.384x216p
response-6-video_eng=704000-video-H264-704.00kbps.en.640x360p
response-6-video_eng=1404000-video-H264-1404.00kbps.en.768x432p
response-6-video_eng=2244000-video-H264-2244.00kbps.en.1024x576p
response-1-audio_eng=93467-audio-AAC-93.47kbps.en
response-2-textstream_dan=3000-text--3.00kbps.da
response-3-textstream_fin=3000-text--3.00kbps.fi
response-4-textstream_nob=3000-text--3.00kbps.nb
response-5-textstream_swe=3000-text--3.00kbps.sv
response-6-video_eng=99000-video-H264-99.00kbps.en.128x72p
response-6-video_eng=252000-video-H264-252.00kbps.en.384x216p
response-6-video_eng=704000-video-H264-704.00kbps.en.640x360p
response-6-video_eng=1404000-video-H264-1404.00kbps.en.768x432p
response-6-video_eng=2244000-video-H264-2244.00kbps.en.1024x576p

g:\111\mpd-content-parser>mpd_content_parser.py -url https://lbs-usp-dash-vod.cm
ore.se/vod/e56b0/oonxxb22rfd(10023265_ISMUSP).ism/oonxxb22rfd(10023265_ISMUSP).m
pd
response-1-audio_eng=93467-audio-AAC-93.47kbps.en
response-2-textstream_dan=3000-text--3.00kbps.da
response-3-textstream_fin=3000-text--3.00kbps.fi
response-4-textstream_nob=3000-text--3.00kbps.nb
response-5-textstream_swe=3000-text--3.00kbps.sv
response-6-video_eng=99000-video-H264-99.00kbps.en.128x72p
response-6-video_eng=252000-video-H264-252.00kbps.en.384x216p
response-6-video_eng=704000-video-H264-704.00kbps.en.640x360p
response-6-video_eng=1404000-video-H264-1404.00kbps.en.768x432p
response-6-video_eng=2244000-video-H264-2244.00kbps.en.1024x576p
response-1-audio_eng=93467-audio-AAC-93.47kbps.en
response-2-textstream_dan=3000-text--3.00kbps.da
response-3-textstream_fin=3000-text--3.00kbps.fi
response-4-textstream_nob=3000-text--3.00kbps.nb
response-5-textstream_swe=3000-text--3.00kbps.sv
response-6-video_eng=99000-video-H264-99.00kbps.en.128x72p
response-6-video_eng=252000-video-H264-252.00kbps.en.384x216p
response-6-video_eng=704000-video-H264-704.00kbps.en.640x360p
response-6-video_eng=1404000-video-H264-1404.00kbps.en.768x432p
response-6-video_eng=2244000-video-H264-2244.00kbps.en.1024x576p

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