Common Errors - PTMagicians/PTMagic GitHub Wiki

OMG I forgot my password!

Relax! Just delete the file "settings.secure.json" in your "PTMagic" folder. You will be asked to create a new password as soon as you call the monitor website again.

PT Magic or Monitor refuses to start (without errors)

If you right click the CMD file and choose properties, then you should see something like โ€œthis has been downloaded from another computer and is blocked. Please unblock ...โ€ Click the unblock box and apply.

Error when starting monitor

After you have finished the installation of PT Magic, started the application, then the monitor application (webserver) and browse to http://localhost:5000 the brwoser shows this error message:

Could not find a part of the path '/home/user/ptmagic/ptmagic/_data/LastRuntimeSummary.json'

This may be caused by the fact that the PT Magic application did not finish its first run yet. This can take up to 10-15 minutes because it collects a lot of data from the exchange for the last 24 hours to build the market trends. The summary file as well as the _data folder is created after that has been completed.

FATAL - Error loading configuration!

If you setup the Profit Trailer path in "settings.general.json" and "Monitor/appsettings.json", make sure you use DOUBLE backslashes in the path. Otherwise you get the follwing error:

FATAL - Error loading configuration! System.FormatException Could not parse the JSON file

Loading Properties failed for setting SETTINGNAME

This means you have specified a settings file in one of your global settings, but PTM cannot find it. Remember, the properties files must be in a folder with the EXACT same name as the global setting, and you MUST at least have one global setting named DEFAULT. See [this wiki entry for more details].(https://github.com/PTMagicians/PTMagic/wiki/Writing-Properties#1-using-a-preset-file)

FATAL - Error loading configuration! Newtonsoft.Json.JsonSerializationException Unexpected end when deserializing object. Path 'GeneralSettings', line X, position X

You are missing a closing bracket at the end of the previous object in your settings.

(Profit Trailer) ERROR AppErrorController - Invalid api_token received - No data returned (PT Magic) The remote server returned an error: (401) Unauthorized (PT Magic) No Server API Token specified.

For PTM to access PT's API and get required data, you need to set an API token in your PT settings, and then add that token to your Profit Trailer settings.general.json file. See: (https://wiki.profittrailer.com/en/webinterfaceguide#account-settings) and (https://github.com/PTMagicians/PTMagic/wiki/settings.general#profittrailerserverapitoken).

Unhandled Exception: System.NullReferenceException / Object Reference not set to an instance of an object.

Your settings.general.json file is unable to find a necessary setting in the "Application" section, either because it has been omitted, or a comma is missing at the end of the previous line. Check that you have a comma at the end of every line in your settings (except the last), check the example default settings that come with PTM, or check the release notes (and prior releases) for any REQUIRED settings changes that you might have skipped since you last updated PTMagic.

PTMagic has been raiding since (DATE) (TIME). Checking things... / PTMagic raid is taking longer than expected

This usually happens when a raid takes longer than the IntervalMinutes you've set in settings.analzyer.json. The interval has elapsed, and PTM is trying to start a new raid, but the previous raid is still being executed. This not a serious problem, however, descreasing resource usage by other applications, or increasing PTM's priority can help speed up raids. If your analyzer is too complex (too many market trends, or global/SMS settings) or using very large time frames (multiple days) for market trends, this can also make the raids take significantly longer.

Unhandled Exception: Newtonsoft.Json.JsonReaderException

Your settings.general.json file is likely missing a comma after one of your settings. You can also use a JSON validator tool to check for other errors.

Error occurs when "Switching global settings to [global setting name]"

FATAL - A error occurred durng the raid... System.InvalidOperationException Sequence contains no elements... indicates that PTM is trying to change a parameter in your PAIRS, DCA, or INDICATORS file that is located on the very first line of your default settings file. Insert a few blank (or commented) lines at the top of your default setting file to fix this.

This site can't be reached

When trying to access your monitor page in a browser, you get an ERR_UNSAFE_REDIRECT. This usually has something to do with server permissions. It can sometimes be resolved by removing the deprecated setting "RootUrl" from the file "general.settings.json" in your PTMagic folder.

Expected/Missing parenthesis

See above

Empty expression

This can occur when you are using a buy/sell FORMULA in your PT settings and a negation symbol before one of the strategy labels. For example, (A && B && !C). For PTM to correctly parse this formula, the strategy with negation should be enclosed in parenthesis like this: (A && B && (!C))

Dashboard (top) update failed!

You can find more information about this error by using the url: http://localhost:8000/_get/DashboardTop (change the port to match your PTM port.

Ticker update failed! - PTMagic Monitor failed to update data.

This is often caused by an incorrect setting in settings.general.json
See: settings.general.json

Missing DLL(s) on older windows versions

If you start seeing something like this:

You may want to update your Universal C Runtime for Windows:
https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows

Debian/Unix - Segfault error

Solution (thanks to @Arararararagi):
sudo apt remove libssl1.0.0/now
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libssl1.0.2

High CPU usage on Unix systems

Some users reported high CPU usage on Unix systems and at least for some users the issue was fixed but installing/updating the Curl/libcurl package on their machine like this:

wget https://curl.haxx.se/download/curl-7.50.3.tar.gz
tar xvf curl-7.50.3.tar.gz
cd curl-7.50.3/
./configure
make`
sudo make install
sudo ldconfig

Taken the instructions from here:
https://howto-ubuntunew.blogspot.de/2016/09/how-to-install-curl-7503-released-on.html