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

Uncaught Exception. System.ComponentModel.Win32Exception (2): The system cannot find the file specified. #119

Closed
DarthBookster opened this issue Jun 15, 2021 · 19 comments
Labels
more info needed needs more info from the reporter

Comments

@DarthBookster
Copy link

Hello all. Trying to get this work on a new account and getting the error below. I went and reinstalled the newest Python and .Net

I feel like maybe I need to add a directory to Path but not sure which.
Thanks for any help.


2021-06-15 12:07:56.617 -05:00 [INF] Beginning Garmin Upload.
2021-06-15 12:07:56.622 -05:00 [FTL] Uncaught Exception.
System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Garmin.GarminUploader.UploadViaPython(String[] files) in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 101
at Garmin.GarminUploader.UploadToGarmin() in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 54
at PelotonToGarminConsole.Program.RunAsync(Configuration config)
at PelotonToGarminConsole.Program.Main(String[] args)

@philosowaffle
Copy link
Owner

philosowaffle commented Jun 15, 2021

Are you using the windows exe? If so I put a fix in for this error yesterday, can download that exe here: https://github.com/philosowaffle/peloton-to-garmin/releases/tag/v2.0.1

Releated discussion thread: #118 (comment)

@philosowaffle philosowaffle added the more info needed needs more info from the reporter label Jun 15, 2021
@Vicore1
Copy link

Vicore1 commented Jun 15, 2021

I am using v2.0.1 (windows exe) and an still getting the same error as 2.0 Also and chance getting the container version of 2.0 able on a raspberry pi?

@DarthBookster
Copy link
Author

Yes this is on windows 10 64bit but this is from user error on my side. I misread the instructions and had set this to true.
"PythonAndGUploadInstalled": false

I went ahead and redownloaded this new version and compared the 2 configuration files side by side and caught it.

my apologies and thanks!

@philosowaffle
Copy link
Owner

@Vicore1 can you also double check your config file has:

"PythonAndGUploadInstalled": false

I'm currently running version 2 docker on my raspberry pi 4 which is arm64 architecture. Do you need arm32?

@Vicore1
Copy link

Vicore1 commented Jun 15, 2021

I have a pi 4 let me give it a shot. I am still getting the same error, I confirmed I have the false flag set for PythonAndGUploadInstalled. I am going to remove and start fresh just to make sure I didn't bork something.

@philosowaffle
Copy link
Owner

If you switch to the docker build then "PythonAndGUploadInstalled": true

Its confusing, I know, but it was a hack to support a single windows exe for those who don't want to mess with the command line.

Basically windows exe set "PythonAndGUploadInstalled": false
All other cases set "PythonAndGUploadInstalled": true

@philosowaffle philosowaffle changed the title Garmin Upload error. Uncaught Exception. System.ComponentModel.Win32Exception (2): The system cannot find the file specified. Jun 16, 2021
@rymanmal1
Copy link

System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Garmin.GarminUploader.UploadViaPython(String[] files) in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 101
at Garmin.GarminUploader.UploadToGarmin() in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 54
at PelotonToGarminConsole.Program.RunAsync(Configuration config)
at PelotonToGarminConsole.Program.Main(String[] args)

Getting the same error on a fresh download of the program. My config file is set up as so:

{
// Config Documentation: https://github.com/philosowaffle/peloton-to-garmin/wiki/Configuration
"App": {
"OutputDirectory": "./output",
"WorkingDirectory": "./working",
"SyncHistoryDbPath": "./output/syncHistory.json",
"EnablePolling": true,
"PollingIntervalSeconds": 86400,
"PythonAndGUploadInstalled": false
},

@rymanmal1
Copy link

I'm running it as the windows exe and I am using version 2.0.1. Let me know if I can provide any more information you might need.

@philosowaffle
Copy link
Owner

Can one of y'all still seeing this error switch logging to "Debug" and post the log output?

I'm not able to reproduce on my end so definitely need to try to grab some more info to see what the difference is.

@rymanmal1
Copy link

So just switch "Information" to "debug"? I get this output log when I do that, which I believe is the same output as before.

2021-06-16 19:07:40.171 -04:00 [INF] Beginning Garmin Upload.
2021-06-16 19:07:40.175 -04:00 [FTL] Uncaught Exception.
System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Garmin.GarminUploader.UploadViaPython(String[] files) in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 101
at Garmin.GarminUploader.UploadToGarmin() in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 54
at PelotonToGarminConsole.Program.RunAsync(Configuration config)
at PelotonToGarminConsole.Program.Main(String[] args)

@rymanmal1
Copy link

rymanmal1 commented Jun 17, 2021

Re-imported it and this is what was in the log.

[20:03:57 DBG] Uploading to Garmin with the following parameters: C:\XXXXXX\XXXXXX\Downloads\win10-x64_2.0.1\python\upload\upload.exe -ge email -gp password -f "C:\XXXXX\XXXXX\Downloads\win10-x64_2.0.1\working\upload\0c864b97a7824e31999408e007cc7140_45_min_Power_Zone_Endurance_Ride_with_Ben_Alldis.fit"
[20:03:57 FTL] Uncaught Exception.
System.ComponentModel.Win32Exception (2): The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Garmin.GarminUploader.UploadViaPython(String[] files) in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 101
at Garmin.GarminUploader.UploadToGarmin() in /home/runner/work/peloton-to-garmin/peloton-to-garmin/src/Garmin/GarminUploader.cs:line 54
at PelotonToGarminConsole.Program.RunAsync(Configuration config)

@philosowaffle
Copy link
Owner

Sanity check, can you verify this path exists: C:\XXXXXX\XXXXXX\Downloads\win10-x64_2.0.1\python\upload\upload.exe?

Typically this error means it failed to find that upload.exe file.

@rymanmal1
Copy link

It does not exist in my folder.

@philosowaffle
Copy link
Owner

Oh, dang, I see the issue. One sec, let me fix it.

@rymanmal1
Copy link

Awesome! 5 coffees on me 🤙

@philosowaffle
Copy link
Owner

philosowaffle commented Jun 17, 2021

Appreciate that!

Ok, download the zip again from here, I just updated it with the correct build.

I did something silly the first time I fixed this bug, I only fixed it in one of my build scripts, but completely forgot to fix it in the release script.

@rymanmal1
Copy link

Didnt work but it made more progress then the previous run. New log below.

2021-06-16 20:27:30.587 -04:00 [ERR] Failed to upload workouts. GUpload had exit code of 1
2021-06-16 20:27:30.588 -04:00 [ERR] GUpload returned an error code. Failed to upload workouts.
Garmin.GarminUploadException: GUpload Exit Code: 1 - GUpload returned an error code. Failed to upload workouts.
at Garmin.GarminUploader.UploadViaPython(String[] files) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\GarminUploader.cs:line 117
at Garmin.GarminUploader.UploadToGarmin() in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\GarminUploader.cs:line 54
at PelotonToGarminConsole.Program.RunAsync(Configuration config)
2021-06-16 20:27:30.601 -04:00 [WRN] GUpload failed to upload files. You can find the converted files at ./output
You can manually upload your files to Garmin Connect, or wait for P2G to try again on the next sync job.
2021-06-16 20:27:30.602 -04:00 [INF] Sleeping for 86400 seconds...

@philosowaffle
Copy link
Owner

philosowaffle commented Jun 17, 2021

If you switch the log back to debug I suspect you will see output similar to:

[19:31:22 INF] Beginning Garmin Upload.
[19:31:22 DBG] Uploading to Garmin with the following parameters: gupload -u **email** -p **password** "./working\upload\52cd0bbffeb04dfd80581a37709e1487_45_min_2000s_Ride_with_Kendall_Toole.fit"
[19:31:23 DBG] Error: Invalid credentials

[19:31:23 INF] GUpload: 2021-06-16 19:31:23,261 [INFO] Try to login on GarminConnect...
2021-06-16 19:31:23,936 [CRITICAL] Login Failure: Authentification failed.

[19:31:23 ERR] Failed to upload workouts. GUpload had exit code of 1
[19:31:24 ERR] GUpload returned an error code. Failed to upload workouts.
Garmin.GarminUploadException: GUpload Exit Code: 1 - GUpload returned an error code. Failed to upload workouts.
   at Garmin.GarminUploader.UploadViaPython(String[] files) in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\GarminUploader.cs:line 117
   at Garmin.GarminUploader.UploadToGarmin() in D:\a\peloton-to-garmin\peloton-to-garmin\src\Garmin\GarminUploader.cs:line 54
   at PelotonToGarminConsole.Program.RunAsync(Configuration config)
[19:31:24 WRN] GUpload failed to upload files. You can find the converted files at ./output
 You can manually upload your files to Garmin Connect, or wait for P2G to try again on the next sync job.
[19:31:24 INF] Sleeping for 86400 seconds...

This is what I get on my machine, and is related to the ongoing auth issues a lot of folks are facing, myself included 😢

@rymanmal1
Copy link

Yep same error! Thanks for your help on this though! I'll keep my eyes peeled for any future updated on this 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed needs more info from the reporter
Projects
None yet
Development

No branches or pull requests

4 participants