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

i18n - 500: Internal server error #746

Open
HuifangYeo opened this issue Feb 7, 2023 · 2 comments
Open

i18n - 500: Internal server error #746

HuifangYeo opened this issue Feb 7, 2023 · 2 comments
Assignees
Labels
🐛 bug unexpected or wrong behavior

Comments

@HuifangYeo
Copy link
Contributor

Steps to reproduce

I configured the internationalization as follows:

session = tt.Session(
    i18n=tt.I18nConfig(default_locale="fr-FR", translations="./translations"),
)

The cube got created successfully but I encountered the following error during session.visualize and when accessing the web app as well:

500: Internal server error on: http://localhost:52286/activeviam/pivot/rest/v8zz2/cube/discovery.

image

translations.zip

Environment

  • atoti: 0.7.2
  • Python: 3.10.0
  • Operating system: win32

Logs (if relevant)

server.log

@HuifangYeo HuifangYeo added the 🐛 bug unexpected or wrong behavior label Feb 7, 2023
@HuifangYeo
Copy link
Contributor Author

It worked after I removed the snippet:

  "_GENERAL_": {
    "Epoch": "Source Simulation"
  },

from the following:

{
  "_CUBES_": {
    "Monte Carlo Analytics": "Analytique de Monte-Carlo"
  },
  "_DESCRIPTIONS_": {
    "[Monte Carlo Data].[AsOfDate].[AsOfDate]": "À la date",
    "[Monte Carlo Data].[CounterpartyId].[CounterpartyId]": "Identifiant de la contrepartie",
    "[Monte Carlo Data].[TimePoint].[TimePoint]": "Point de temps",
    "[Monte Carlo Data].[TradeId].[TradeId]": "Identifiant commercial",
    "[Measures].[contributors.COUNT]": "Nombre de faits",
    "[Measures].[CE_vector]": "CE Vecteur",
    "[Measures].[MtM_vector.MEAN]": "moyenne de MtM_Vecteur",
    "[Measures].[MtM_vector.SUM]": "Somme de MtM_Vecteur"
  },
  "_FORMATTERS_": {
    "[Measures].[NotionalUSD]": "DOUBLE[USD$#,###.000]"
  },
  "_GENERAL_": {
    "Epoch": "Source Simulation"
  },
  "_MEASURES_": {
    "contributors.COUNT": "Nombre de faits",
    "CE_vector": "CE Vecteur",
    "MtM_vector.MEAN": "moyenne de MtM_Vecteur",
    "MtM_vector.SUM": "Somme de MtM_Vecteur"
  }
}

@tibdex
Copy link
Member

tibdex commented Mar 10, 2023

In your translations.zip, fr-FR.json contains a incorrect trailing comma:

"_GENERAL_": {
    "Epoch": "Source Simulation", # <- here
},

Removing it and the AsOfDate formatter fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug unexpected or wrong behavior
Projects
None yet
Development

No branches or pull requests

2 participants