Ezzpify / ClipToTube

Twitch clip to youtube
5 stars 1 forks source link

Error: An unhandled exception caused mBackgroundWork to crash. #3

Open ghost opened 7 years ago

ghost commented 7 years ago

I'm not experienced with C# but I managed to set it up. But I keep getting errors before the any upload begins. Heres the log:

[Session 11/2/2017 21:38:59] Info: Checking 40 posts at /r/leagueoflegends [Session 11/2/2017 21:38:59] Success: Adding a clips.twitch.tv link to queue (5tgxoy (https://clips.twitch.tv/imaqtpie/PreciousBadgerDatSheffy) [Session 11/2/2017 21:39:11] Info: Checking 31 posts at /r/globaloffensive [Session 11/2/2017 21:39:23] Info: Checking 31 posts at /r/rocketleague [Session 11/2/2017 21:39:35] Info: Checking 37 posts at /r/overwatch [Error 11/2/2017 21:39:41] Error: An unhandled exception caused mBackgroundWork to crash. System.ArgumentException: The path is not of a legal form. at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetFullPathInternal(String path) at System.Net.WebClient.GetUri(String path) at System.Net.WebClient.DownloadFile(String address, String fileName) at ClipToTube.Web.DownloadFile(String url) in C:\Users\Desktop\ClipToTube-master\ClipToTube\Web.cs:line 53 at ClipToTube.Session.UploadClips(List`1 clips) in C:\Users\Desktop\ClipToTube-master\ClipToTube\Session.cs:line 206 at ClipToTube.Session.MBackgroundWork_DoWork(Object sender, DoWorkEventArgs e) in C:\Users\Desktop\ClipToTube-master\ClipToTube\Session.cs:line 163 at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) [Session 11/2/2017 21:39:41] Info: Worker has exited. Hmm.

Ezzpify commented 7 years ago

Seems like they changed how they store the raw .mp4 I pushed a fix for this. Again, just parsing raw html like that isn't the most optimal way, but it works.. Haha.

See if it works for you now.

ghost commented 7 years ago

Lol, ty gonna test it out <3

ghost commented 7 years ago

Update new error same timing: Weberror at DownloadFile System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.WebClient.DownloadFile(Uri address, String fileName) at System.Net.WebClient.DownloadFile(String address, String fileName) at ClipToTube.Web.DownloadFile(String url) in C:\Users\Pecex\Desktop\botas\ClipToTube-master\ClipToTube\Web.cs:line 53 Weberror at DownloadFile System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.WebClient.DownloadFile(Uri address, String fileName) at System.Net.WebClient.DownloadFile(String address, String fileName) at ClipToTube.Web.DownloadFile(String url) in C:\Users\Pecex\Desktop\botas\ClipToTube-master\ClipToTube\Web.cs:line 53 Weberror at DownloadFile System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.WebClient.DownloadFile(Uri address, String fileName) at System.Net.WebClient.DownloadFile(String address, String fileName) at ClipToTube.Web.DownloadFile(String url) in C:\Users\Pecex\Desktop\botas\ClipToTube-master\ClipToTube\Web.cs:line 53 Weberror at DownloadFile System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.WebClient.DownloadFile(Uri address, String fileName) at System.Net.WebClient.DownloadFile(String address, String fileName) at ClipToTube.Web.DownloadFile(String url) in C:\Users\Pecex\Desktop\botas\ClipToTube-master\ClipToTube\Web.cs:line 53 Weberror at DownloadFile System.Net.WebException: The remote server returned an error: (403) Forbidden. at System.Net.WebClient.DownloadFile(Uri address, String fileName) at System.Net.WebClient.DownloadFile(String address, String fileName) at ClipToTube.Web.DownloadFile(String url) in C:\Users\Pecex\Desktop\botas\ClipToTube-master\ClipToTube\Web.cs:line 53 [Session 11/2/2017 22:44:19] Info: Sleeping for 478 Seconds.

Ezzpify commented 7 years ago

Okay, I downloaded my own settings and it works for me now. Can you try again? I pushed update.

ghost commented 7 years ago

It works, you're a god. Is there any easy way to change the comment in reddit post, aswell as youtube description? PS: it throws some errors every 2-3 uploads. Don't know if it's usual.

ghost commented 7 years ago

Heres is log from one of the errors: [Session 11/2/2017 23:18:50] Error: An error prevented the upload from completing. RedditSharp.RateLimitException: Exception of type 'RedditSharp.RateLimitException' was thrown. at RedditSharp.Things.Post.Comment(String message) at ClipToTube.Session.videosInsertRequest_ResponseReceived(Video video, String postId) in C:\Users\Pecex\Desktop\TWITCH\ClipToTube\Session.cs:line 310 at ClipToTube.Session.<>c__DisplayClass12_0.b0(Video e) in C:\Users\Pecex\Desktop\TWITCH\ClipToTube\Session.cs:line 269 at Google.Apis.Upload.ResumableUpload2.ProcessResponse(HttpResponseMessage response) in C:\Users\cloudsharp\Documents\GitHub\google-api-dotnet-client\Src\Support\GoogleApis\Apis\[Media]\Upload\ResumableUpload.cs:line 858 at Google.Apis.Upload.ResumableUpload1.MediaCompleted(HttpResponseMessage response) in C:\Users\cloudsharp\Documents\GitHub\google-api-dotnet-client\Src\Support\GoogleApis\Apis[Media]\Upload\ResumableUpload.cs:line 566 at Google.Apis.Upload.ResumableUpload`1.d91.MoveNext() in C:\Users\cloudsharp\Documents\GitHub\google-api-dotnet-client\Src\Support\GoogleApis\Apis[Media]\Upload\ResumableUpload.cs:line 549 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Google.Apis.Upload.ResumableUpload1.<SendNextChunkAsync>d__90.MoveNext() in C:\Users\cloudsharp\Documents\GitHub\google-api-dotnet-client\Src\Support\GoogleApis\Apis\[Media]\Upload\ResumableUpload.cs:line 540 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Google.Apis.Upload.ResumableUpload1.d__87.MoveNext() in C:\Users\cloudsharp\Documents\GitHub\google-api-dotnet-client\Src\Support\GoogleApis\Apis[Media]\Upload\ResumableUpload.cs:line 463

ghost commented 7 years ago

ALSO: the bot doesn't seem to post comments on reddit posts, it uploaded like 20 videos but only 1 comment on reddit so far.

Ezzpify commented 7 years ago

RedditSharp.RateLimitException

There is a limit on reddit of how many comments you can post within a certain time frame. You should add a longer wait inbetween each video upload or something.

ghost commented 7 years ago

Last question: is there any way to run this in VPS terminal (ubuntu, debian, linux) to be exact.

Ezzpify commented 7 years ago

Unless you port to mono, then no