lavolp3 / MMM-AVStock

MagicMirror module for displaying stock price with Alphavantage API
MIT License
38 stars 18 forks source link

error with conifg file #56

Closed Firestoner closed 11 months ago

Firestoner commented 3 years ago

Hello,

first of all thank you for your hard work, am very grateful for it.

got a problem with my config file, after starting MagicMirror there is always showing me a error with my config file.

Config file:

{
            module: "MMM-AVStock",
            position: "top_left", //"bottom_bar" is better for `mode:ticker`
            config: {
                apiKey : "deleted APIKey",
                timeFormat: "DD-MM HH:mm",
                width: null,
                symbols : ["AAPL", "GOOGL", "TSLA"],
                alias: ["APPLE", "GOOGLE", "TESLA"],
                locale: config.language,
                tickerDuration: 20,
                chartDays: 90,
                maxTableRows: null,
                mode : "table",                  // "table" or "ticker"
                showChart: true,
                pureLine: false,
                chartWidth: null,
                showVolume: true,
                chartInterval: "daily",          // choose from ["intraday", "daily", "weekly", "monthly"]
                movingAverage: {
                    type: 'SMA',
                    periods: [200],
                },
                decimals : 2,
                chartType: 'line',                // 'line', 'candlestick', or 'ohlc'
                chartLineColor: '#eee',
                chartLabelColor: '#eee',
                coloredCandles: true,
                debug: false,
            }
        },

see no problem with it, only added my API-Key to your code

Could you help me?

MOPP1 commented 2 years ago

Hey I had a similar issue. I resolved it my commenting out the: "locale: config.language, " here is my code that worked `{

                    //disabled: true,
                        module: "MMM-AVStock",
                        position: "top_left", //"bottom_bar" is better for `mode:ticker`
                        config: {
                            apiKey : "Lol, not sharing ;)",
                            timeFormat: "DD-MM HH:mm",
                            width: null,
                            symbols : ["AAPL", "GOOGL", "TSLA"],
                            alias: ["APPLE", "GOOGLE", "TESLA"],
                            //locale: config.language,
                            tickerDuration: 20,
                            chartDays: 90,
                            maxTableRows: null,
                            mode : "table",                  // "table" or "ticker"
                            showChart: true,
                            pureLine: false,
                            chartWidth: null,
                            showVolume: true,
                            chartInterval: "daily",          // choose from ["intraday", "daily", "weekly", "monthly"]
                            movingAverage: {
                                type: 'SMA',
                                periods: [200]
                            },
                            decimals : 2,
                            chartType: 'line',                // 'line', 'candlestick', or 'ohlc'
                            chartLineColor: '#eee',
                            chartLabelColor: '#eee',
                            coloredCandles: true,
                            debug: false
                        }
                    },`
lavolp3 commented 11 months ago

couldn't reproduce this error.