kovdavid / SipsDownloader

Utility to download Elixir Sips screencast videos written in Elixir (subscription to Elixir Sips required)
MIT License
14 stars 1 forks source link

download_dir is not expanded #3

Closed collegeimprovements closed 7 years ago

collegeimprovements commented 8 years ago

I set my username and password in config.exs file. And then ran ./sips_downloader command. Unfortunately it didn't work :(

=ERROR REPORT==== 23-Feb-2016::15:00:29 ===
** Task <0.69.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"001_Introduction_and_Installing_Elixir.mkv">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=1321">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}

=ERROR REPORT==== 23-Feb-2016::15:00:29 ===
** Task <0.70.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"002_Basic_Elixir.mp4">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=1367">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Failed to download 001_Introduction_and_Installing_Elixir.mkv: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}
Starting download: 002_Basic_Elixir.md
Failed to download 002_Basic_Elixir.mp4: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}
Starting download: 003_Pattern_Matching.mp4

=ERROR REPORT==== 23-Feb-2016::15:00:29 ===
** Task <0.68.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"001_Introduction_and_Installing_Elixir.mp4">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=1366">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Failed to download 001_Introduction_and_Installing_Elixir.mp4: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}
Starting download: 003_Pattern_Matching.md
Failed to download 002_Basic_Elixir.mkv: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}
Starting download: 004_Functions.mp4

=ERROR REPORT==== 23-Feb-2016::15:00:29 ===
** Task <0.71.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"002_Basic_Elixir.mkv">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=1358">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Failed to download 001_Introduction_and_Installing_Elixir.md: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}

=ERROR REPORT==== 23-Feb-2016::15:00:29 ===
** Task <0.67.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"001_Introduction_and_Installing_Elixir.md">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=1382">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Starting download: 004_Functions.md

=ERROR REPORT==== 23-Feb-2016::15:00:31 ===
** Task <0.89.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"002_Basic_Elixir.md">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=1357">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Failed to download 002_Basic_Elixir.md: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}
Starting download: 005_Modules.mp4
Failed to download 004_Functions.mp4: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}

=ERROR REPORT==== 23-Feb-2016::15:00:31 ===
** Task <0.97.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"004_Functions.mp4">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=5086">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Starting download: 005_Modules.md

=ERROR REPORT==== 23-Feb-2016::15:00:31 ===
** Task <0.91.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"003_Pattern_Matching.mp4">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=14879">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
Failed to download 003_Pattern_Matching.mp4: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}
Starting download: 005_modules_example.tar.gz
Failed to download 003_Pattern_Matching.md: {{:badmatch, {:error, :enoent}}, [{SipsDownloader.EpisodeDownloader, :process_download, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 25]}, {SipsDownloader.EpisodeDownloader, :run, 2, [file: 'lib/sips_downloader/episode_downloader.ex', line: 6]}, {Task.Supervised, :do_apply, 2, [file: 'lib/task/supervised.ex', line: 89]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 240]}]}

=ERROR REPORT==== 23-Feb-2016::15:00:31 ===
** Task <0.94.0> terminating
** Started from <0.57.0>
** When function  == #Fun<Elixir.SipsDownloader.EpisodeDownloader.run.2>
**      arguments == [{<<"003_Pattern_Matching.md">>,
                       <<"https://elixirsips.dpdcart.com/subscriber/download?file_id=1413">>},
                      #{dir => <<"~/Desktop/elixirsips-sips/elixirnation">>,
                        parent => <0.57.0>,
                        session_id => <<"hke1l87phcsc5p0t456e57han6">>,
                        work_ref => #Ref<0.0.1.766>}]
** Reason for termination ==
** {{badmatch,{error,enoent}},
    [{'Elixir.SipsDownloader.EpisodeDownloader',process_download,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,25}]},
     {'Elixir.SipsDownloader.EpisodeDownloader',run,2,
         [{file,"lib/sips_downloader/episode_downloader.ex"},{line,6}]},
     {'Elixir.Task.Supervised',do_apply,2,
         [{file,"lib/task/supervised.ex"},{line,89}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,240}]}]}
DavsX commented 8 years ago

Did you set download_dir as well in the config? Does the directory exist?

collegeimprovements commented 8 years ago

Yes. I've set the download_dir and that directory actually exists.

dgilperez commented 8 years ago

+1

dgilperez commented 8 years ago

Ok, I fixed it using the full path.

Change "~/Desktop/elixirsips-sips/elixirnation" to "/Users/yourusername/Desktop/elixirsips-sips/elixirnation" and it will work.

DavsX commented 8 years ago

Thank you both, for pointing out the bug and investigating it. It seems, like the SipsDownloader.EpisodeDownloader.process_download function on line 25 could use a Path.expand call before opening the file itself. Care to submit a pull request? :)

collegeimprovements commented 8 years ago

I'll do it.

DavsX commented 7 years ago

Fixed in the latest release.