WxtoImg Fix to download daily Weather Keplers/TLE’s from Celestrak.org
On July 4th, 2022 Celestrak.com changed the server redirects so that all incoming queries now point to celestrack.org (not.com). This works great for all sorts of browsers and software, but not so much with legacy software like WxToImg. When trying to get Keplers you will get this error:
Here is another method for those who do not wish to change the software:
Here is a step-by-step fix to allow WXtoImg for WINDOWS to use fresh, daily TLE’s/Keplers
You will need a text editor such as notepad, or notepad++.
- First, you need to turn OFF the Automatic Kepler Download in Wxtoimg
- Open WxtoImg
- Navigate to >options>GUI options
- uncheck the “Automatically Update Keplers”
- Click “OK”
- Click “Save Options”
- Restart the program
- Because not all windows machines have a tool for downloading files such as weather.txt, I am recommending using Powershell by Microsoft as it works, and is kept updated. You can check to see if you already have it installed by going the Windows Search, and typing “powershell” if it is installed you will see the Windows Power Shell App and logo,
- Download from Microsoft here using the MSI package, and install the software https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.2
- Open a text editor such as notepad or notepad++
- Copy and paste the following (Editing it to match your folder structure only if different than a typical WXtoImg installation )
You will need to know WHERE your version of WxtoImg stores its weather.txt file, this is usually C:\Users\YOURUSERNAMEHERE\AppData\Roaming\WXtoImg\weather.txt for instance mine is C:\Users\creine\AppData\Roaming\WXtoImg\weather.txt
NOTE : You DO NOT need to edit or replace $env:userprofile in the example below.
:: WxtoImg Fix for celestrak.org ::EDIT TO MATCH YOUR WXTOIMG EXECUTABLE LOCATION powershell -Command Invoke-WebRequest http://celestrak.org/NORAD/elements/weather.txt -OutFile $env:userprofile\AppData\Roaming\WXtoImg\weather.txt
It should look like this (remember to change it to match your file structure, this is mine as an example). If you’re using Windows 7 read on, otherwise, skip to step 6.
For those using Windows 7 and Powershell only: Changing USER_NAME to your Windows username, the command line would be:
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://celestrak.org/NORAD/elements/weather.txt', 'C:\Users\USER_NAME\AppData\Roaming\WXtoImg\weather.txt')"
6. Save the file using “Save As” then “Save as type”>”All Files *.*” Using the Filename such as WXtoImgTLE.bat in a folder you will remember, like C:/weatherTLE/WXtoImgTLE.bat
7. You have just created a batch file that will now when you run it download and install the very latest TLE/Keplers into your WxtoImg folder.
8. NOTE: Clicking “Update Keplers” will still result in the error screen popping up, but you should not do that as you have already loaded the weather.txt that wxtoimg uses.
Automating the downloading of Keplers
So now you can download keplers/TLE’s manually, but who wants to do that every time you want to run WxtoImg, or if you’re like me, I leave WxtoImg running 24/7. But there is a simple way to Automate it using Windows Task Scheduler
- Type into the Windows search bar, “Task Scheduler”
- Open Task Scheduler
- Click “Create Basic Task”
4. Give it a name under “Name:” such as WxtoImg TLE Download,
5. Click “Next”
6. Select “Daily” In the Trigger section then click “Next”
7. Select a time. Maybe 12:00 noon so type in 12:00:00 PM
Make sure “recur every” is set to “1” days Then click “next”
8. Under Action, choose “Start a program”, then click next
9. Under “Start a Program” Browse to the location of the WxtoImg.bat file you created and Select it and click “open”
10. Check your settings it should look something like this:
11. Click “Finish” and you’re all set. You can test is by selecting the WxtoImg name under the Task Scheduler Library and clicking “Run”
Final notes and other fixes:
I am looking into editing the software WxtoImg using a HEX editor to change the code to point to the correct domain, so far I have not been able to do it. In addition to the Power Shell solution you could use the following as well:
Use the curl command (built into Windows).
curl -o weather.txt https://celestrak.org/NORAD/elements/weather.txt
Run this from the command line (DOS prompt). The “-o weather.txt” says where
to write the file. The URL to get from is at the end of the command. Or put it in a batch file
If your Windows doesn’t already have curl, get it here:
Use the httpget command
httpget http://www.celestrak.org/NORAD/elements/weather.txt C:\Users\yourusernamehere\AppData\Roaming\WXtoImg\weather.txt pause
Proxy Wrapper for WxtoImg
Here is a simple proxy “wrapper” for the aging WxToImage. It starts a proxy server on your machine on 127.0.0.1 port 8080 and properly handles any application redirects. When the weather.txt format breaks in future it will be possible to implement a data converter here as well. https://github.com/provector/wxtoproxy Setup is quite simple, note that your antivirus may throw a flag at WS.Reputation.1, but it is safe.
I hope this helped! If you found it useful and would like to contribute to the site, Please Click the link below!
Jochen Koester has edited the original WxtoIMG software to now work as it originally did with the changes to the TLE/Keplers. No other software is required. He also created a new setup because there were errors with the old setup under Windows 10 and Windows 11.
You can download the software as a zip file here: https://usradioguy.com/WXtoIMG/wxtoimg2112betasetupfixed.zip
You can back up your existing config file by copying C:\Users\YOURUSERNAMEHERE\AppData\Roaming\WXtoImg\WXTOIMG.CFG
I recommend uninstalling your current version of WXtoImg.
Extract the zip file and run wxtoimg2112betasetupfixed.exe to start the install program.
Paste your copied WXTOIMG.CFG into C:\Users\YOURUSERNAMEHERE\AppData\Roaming\WXtoImg\ and you will have all your old settings
The file Serialfree.txt is in the zip file and contains the name and serial to unlock all the WXtoIMG features.
Fix for Mac Users:
- Go to https://celestrak.org/NORAD/elements/weather.txt and download the “weather.txt” file.
- Open the file in TextEdit.
- When TextEdit asks you if you want to keep the .txt and .rtf file extensions, click “Yes”.
- Save the file to your desktop.
- Delete the “.rtf” extension from the file name.
- Open your home folder by pressing Command+Shift+. (period).
- If you have previously had WXtoImg up and running, you will see a hidden file named “.wxtoimg”.
- Inside the “.wxtoimg” file, you will see the weather.txt file.
- Replace the existing weather.txt file with the one you saved on your desktop.
- Close the “.wxtoimg” file.
- Once you’re done repeat the key sequence Command+Shift+. (period) to hide them again as you don’t want to accidentally screw something up
WXtoImg is now updated!
Here are some additional tips:
Once you have replaced the weather.txt file, you may need to restart WXtoImg for the changes to take effect.