ERPNext v5 fails to create a new company

I go to:
Setup/Accounts/Chart of Accounts/Menu/New Company
I get the following error:

> Traceback (innermost last):
>   File "/home/erpnext/frappe-bench/apps/frappe/frappe/app.py", line 49, in application
>     response = frappe.handler.handle()
>   File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
>     execute_cmd(cmd)
>   File "/home/erpnext/frappe-bench/apps/frappe/frappe/handler.py", line 89, in execute_cmd
>     ret = frappe.call(method, **frappe.form_dict)
>   File "/home/erpnext/frappe-bench/apps/frappe/frappe/__init__.py", line 682, in call
>     return fn(*args, **newargs)
>   File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py", line 90, in get_charts_for_country
>     _get_chart_name(f.read())
>   File "/home/erpnext/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py", line 82, in _get_chart_name
>     content = json.loads(content)
>   File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
>     return _default_decoder.decode(s)
>   File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
>     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
>   File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
>     raise ValueError("No JSON object could be decoded")
>  ValueError: No JSON object could be decoded

This happens only when I place the file is_iceland_chart_template_standard.json
In directory
erpnext/erpnext/accounts/doctype/account/chart_of_accounts
This is the content:

{
    "country_code": "is",
    "name": "Íslenskur bókhaldslykill fyrir ERPNext - útgáfa 1",
        "is_active": "Yes",
    "tree": {
        "Eignir": {
            "Veltufjármunir": {
                "Viðskiptakröfur": {
                    "Viðskiptamenn": {
                        "account_type": "Receivable"
                    },
                    "Greiðslukort": {
                        "account_type": "Receivable"
                    },
                    "Kröfur í innheimtu": {
                        "account_type": "Receivable"
                    }
                },
                "Bankareikningar og handbært fé": {
                    "Debitreikningur Landsbankinn": {
                        "account_type": "Bank"
                    },
                    "EUR Landsbankinn": {
                        "account_type": "Bank"
                    },
                    "USD Landsbankinn": {
                        "account_type": "Bank"
                    },
                    "Sjóður": {
                        "account_type": "Cash"
                    }
                },
                "Skuldabréf og skuldabréfasjóðir": {
                    "Skuldabréf": {},
                    "Sparibréf": {},
                    "Veltubréf": {},
                    "Markaðsbréf": {}
                },
                "Fyrirframgreiðslur": {
                    "Fyrirframgreidd laun": {},
                    "Fyrirframgreiddur kostnaður": {}
                },
                "Vörubirgðir": {
                    "Birgðageymsla": {
                        "account_type": "Stock"
                    }
                }
            },
            "Fastafjármunir": {
                "Áhættufjármunir": {
                    "Hlutafjáreign": {
                      "account_type": "Fixed Asset"
                    }
                },
                "Varanlegir rekstrarfjármunir": {
                    "Skrifstofuáhöld": {
                      "account_type": "Fixed Asset"
                    },
                    "Tölvubúnaður": {
                      "account_type": "Fixed Asset"
                    },
                    "Hugbúnaður": {
                      "account_type": "Fixed Asset"
                    },
                    "Bifreiðar": {
                      "account_type": "Fixed Asset"
                    },
                    "Vélar og tæki": {
                      "account_type": "Fixed Asset"
                    },
                    "Fasteignir": {
                      "account_type": "Fixed Asset"
                    },
                    "Land": {
                      "account_type": "Fixed Asset"
                    }
                }
            },
                        "root_type": "Asset"
        },
        "Skuldir og eigið fé": {
            "Skammtímaskuldir": {
                "Viðskiptaskuldir": {
                    "Lánadrottnar": {
                        "account_type": "Payable"
                    },
                    "Mótteknar birgðir en ekki greiddar": {
                        "account_type": "Stock Received But Not Billed"
                    },
                    "Ógreiddir reikningar": {},
                    "Ógreiddur tollur": {}
                },
                "Virðisaukaskattur": {
                    "Innskattur 11%": {
                        "account_type": "Tax"
                    },
                    "Innskattur 24%": {
                        "account_type": "Tax"
                    },
                    "Útskattur 11%": {
                        "account_type": "Tax"
                    },
                    "Útskattur 24%": {
                        "account_type": "Tax"
                    },
                    "Uppgjörsreikningur virðisauka": {},
                    "Handfærður innskattur": {},
                    "Virðisaukaskattur í tolli": {}
                },
                "Ógreidd opinber gjöld": {
                    "Áætlaður tekjuskattur": {},
                    "Fjármagnstekjuskattur": {}
                },
                "Ógreitt vegna launa starfsmanna": {
                    "Ógreidd staðgreiðsla": {},
                    "Ógreiddur lífeyrissjóður": {},
                    "Ógreiddur viðbótarlífeyrissparnaður": {},
                    "Ógreidd félagsgjöld": {},
                    "Ógreitt orlof": {},
                    "Ógreitt tryggingagjald": {},
                    "Ógreidd opinber gjöld starfsmanna": {}
                }
            },
            "Langtímaskuldir": {
                "Verðtryggt lán": {},
                "Óverðtryggt lán": {}
            },
            "Egið fé": {
                "Hagnaður ársins": {},
                "Óráðstafað eigið fé": {},
                "Hlutafé": {},
                "Lögbundinn varasjóður": {}
            },
                        "root_type": "Liability"
        },
        "Rekstrartekjur": {
            "Tekjur af sölu vöru og þjónustu": {
                "Sala vöru": {
                    "account_type": "Income Account"
                },
                "Sala þjónustu": {
                    "account_type": "Income Account"
                }
            },
            "Aðrar tekjur": {
                "Ýmsar tekjur án vsk": {
                    "account_type": "Income Account"
                }
            },
                        "root_type": "Income"
        },
        "Rekstrargjöld": {
            "Kostnaðarverð seldrar vöru": {
                "Vörunotkun": {
                    "account_type": "Expense Account" 
                },
                "Kostnaður við birgðamat": {
                    "account_type": "Expenses Included In Valuation" 
                },
                "Birgðaleiðrétting": {
                    "account_type": "Stock Adjustment" 
                },
                "Flutningsgjöld án vsk": {
                    "account_type": "Expense Account" 
                },
                "Bankakostnaður vegna vörukaupa": {
                    "account_type": "Expense Account" 
                },
                "Tollar og önnur gjöld": {
                    "account_type": "Expense Account" 
                },
                "account_type": "Expense Account"
            },
            "Laun og launatengd gjöld": {
                "Laun starfsmanna": {
                    "account_type": "Expense Account" 
                },
                "Lífeyrissjóðsframlag": {
                    "account_type": "Expense Account" 
                },
                "Viðbótar lífeyrissjóðsframlag": {
                    "account_type": "Expense Account" 
                },
                "Bifreiðastyrkir": {
                    "account_type": "Expense Account" 
                },
                "Dagpeningar": {
                    "account_type": "Expense Account" 
                },
                "Starfsendurhæfingarsjóður": {
                    "account_type": "Expense Account" 
                },
                "Tryggingargjald": {
                    "account_type": "Expense Account" 
                }
            },
            "Skrifstofukostnaður": {
                "Fjarskiptaþjónusta með vsk": {
                    "account_type": "Expense Account" 
                },
                "Ritföng og pappír með vsk": {
                    "account_type": "Expense Account" 
                },
                "Burðargjöld án vsk": {
                    "account_type": "Expense Account" 
                },
                "Blöð og tímarit með vsk": {
                    "account_type": "Expense Account" 
                },
                "Húsgögn með vsk": {
                    "account_type": "Expense Account" 
                },
                "Hugbúnaður með vsk": {
                    "account_type": "Expense Account" 
                },
                "Aðkeyptur akstur með vsk": {
                    "account_type": "Expense Account" 
                },
                "Stöðumælagjöld og sektir": {
                    "account_type": "Expense Account" 
                },
                "Verkfæri og áhöld með vsk": {
                    "account_type": "Expense Account" 
                },
                "Viðhald verkfæra og áhalda með vsk": {
                    "account_type": "Expense Account" 
                }
            },
            "Aðkeypt þjónusta": {
                "Endurskoðun með vsk": {
                    "account_type": "Expense Account" 
                },
                "Lögfræðiþjónusta með vsk": {
                    "account_type": "Expense Account" 
                },
                "Öryggisþjónusta með vsk": {
                    "account_type": "Expense Account" 
                },
                "Auglýsingar með vsk": {
                    "account_type": "Expense Account" 
                }
            },
            "Rekstur bifreiða": {
                "Eldsneyti með vsk": {
                    "account_type": "Expense Account" 
                },
                "Viðgerðir með vsk": {
                    "account_type": "Expense Account" 
                },
                "Varahlutir með vsk": {
                    "account_type": "Expense Account" 
                },
                "Tryggingar og skattar án vsk": {
                    "account_type": "Expense Account" 
                }
            },
            "Rekstur húsnæðis": {
                "Hiti með vsk": {
                    "account_type": "Expense Account" 
                },
                "Rafmagn með vsk": {
                    "account_type": "Expense Account" 
                },
                "Húsaleiga án vsk vsk": {
                    "account_type": "Expense Account" 
                },
                "Viðgerðir og viðhald með vsk": {
                    "account_type": "Expense Account" 
                },
                "Ræstingarvörur með vsk": {
                    "account_type": "Expense Account" 
                },
                "Tryggingar án vsk": {
                    "account_type": "Expense Account" 
                },
                "Fasteignagjöld án vsk": {
                    "account_type": "Expense Account" 
                },
                "Vatns- og fráveitugjöld án vsk": {
                    "account_type": "Expense Account" 
                },
                "Sameiginlegur rekstrarkostnaður húsnæðis án vsk": {
                    "account_type": "Expense Account" 
                }
            },
            "Ferðakostnaður": {
                "Flugfargjöld": {
                    "account_type": "Expense Account" 
                },
                "Hótelkostnaður": {
                    "account_type": "Expense Account" 
                },
                "Bílaleigukostnaður": {
                    "account_type": "Expense Account" 
                }
            },
            "Bankakostnaður": {
                "Færslugjöld án vsk": {
                    "account_type": "Expense Account" 
                },
                "Greiðslukortakostnaður án vsk": {
                    "account_type": "Expense Account" 
                },
                "Innheimtukostnaður": {
                    "account_type": "Expense Account" 
                }
            },
            "Ýmiss kostnaður": {
                "Kaffistofukostnaður án vsk": {
                    "account_type": "Expense Account" 
                },
                "Styrkir og gjafir án vsk": {
                    "account_type": "Expense Account" 
                },
                "Móttaka gesta án vsk": {
                    "account_type": "Expense Account" 
                }
            },
            "Afskriftir": {
                "Skrifstofuáhalda": {},
                "Tölvubúnaðar": {},
                "Hugbúnaðar": {},
                "Bifreiða": {},
                "Véla og tækja": {},
                "Fasteigna": {}
            },
            "Fjármagnsliðir": {
                "Vaxtatekjur": {},
                "Vaxtagjöld skammtímalána": {},
                "Vaxtagjöld langtímalána": {},
                "Gengishagnaður/tap": {}
            },
            "Rekstrartengdir skattar og opinber gjöld": {
                "Tekjuskattur": {},
                "Útvarpsgjald": {}
            },
                        "root_type": "Expense"
        }
    }
}

So there must be something wrong with my chart of accounts file.
Because when I remove the file everything is OK.
Any suggestions how to debug this?
I have used the account_type from the standard_chart_of_accounts.py file.
Is that maybe wrong?

A comma (,) missing before “Rekstrargjöld”.

Thanks for pointing to the missing comma.
I have corrected the comma and updated the code above, but I still get the error:

“ValueError: No JSON object could be decoded”

So there must be something more than the , wrong with my chart of accounts, right?

I have also printed the whole thing out and carefully gone over brackets and every line.

But I am probably overlooking something.

Do you have any other suggestion how this might be tackled?

Can you provide the full traceback?

Also try to debug using json.loads() from console.

I am not that deeply into Python or the frappe framework.
More of a newbie.
Could you please give me a little more on how to generate a full traceback?

Also could you please give me steps or a reference to where I can learn more how to debug using json.loads() from console?

My initial goal was to install ERPNext, translate to Icelandic, setup charts of accounts and setup ERPNext for 2 companies. I maybe little over my head already, I think.

But any suggestion to achieve the initial goal would be appreciated.

I could not found any issue with the charts you provided, I just replace all spaces with tabs.

I have created a github gist for the chart (https://gist.github.com/nabinhait/3e86a032d1ba78e6e17a). Please copy the RAW content and also try the using same file name.
If you successful to create company with the charts, please send a Pull Request.

Note: I can include the chart directly into the erpnext, but if you send the PR, you contribution will be registered. Thanks for your hard work.

Thanks for your input and help.
It allowed me to finally figure this out.
I have tested it and the Wizard correctly imports it.
I have sent a PR with updated is translations and the is_chart_of_accounts.json.

On other issues:
1)
How do I get Icelandic listed here?
https://frappe.io/translator
Or maybe that is not important?

I have been trying to remove a site by:
drop database site1.local
delete site1.local in directory sites

Then creating it again.
bench new-site site1.local (I always get an error when trying to recreate the site)

What else needs to be done for me to be able create a site again?

How do I remove user frappe or is that not necessary?

1, We will add Icelandic in the next overhaul of the translator project (soon after v5 is released)

  1. use bench frappe [sitename] --reinstall

Thank you very much.
I am going to try this out: use bench frappe [sitename] --reinstall

Thanks for your suppport