You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am reaching out to seek your assistance regarding an issue I am encountering with the Azure Cosmos DB Emulator.
Problem Description
I am developing a .NET application using Azure Cosmos DB, and when executing Gremlin queries on the Azure Cosmos DB Emulator locally, I encounter the following error:
Gremlinquery syntax error: Unable to parse decimalliteral.
This error occurs when executing a query containing a decimal number, for example: .property('field1$.field2', 2.2). After several investigations, it seems that this error is related to the emulator's culture configuration, specifically how decimal numbers are interpreted. My development environment uses the French culture, which uses a comma (,) as the decimal separator instead of a period (.).
Technical Details
Operating System: Windows 11
Version of Cosmos DB Emulator: 2.14.18.0 (installed locally, NOT the Docker container)
Version of .NET: 8.0.300
Actions Taken
By changing my system's regional settings to en-US, I was able to confirm that the issue is indeed related to the application's culture, as the exception no longer occurs in this configuration. However, I wish to keep my system in French.
To address this issue, I attempted to add the following line in my emulator startup script:
$env:DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
However, for the past few months, adding this line has completely prevented the emulator from starting.
Here's my full script :
# Set culture to en-US for this session# this is not working either, the exception is still thrown# $env:DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = "false"# $env:DOTNET_CLI_UI_LANGUAGE = "en-US"# $env:LC_ALL = "en-US"# $env:LANG = "en-US"# With this setting, the emulator not start properly# $env:DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = 1 Import-Module"$env:ProgramFiles\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator"$startEmulatorCmd="Start-CosmosDbEmulator -EnableGremlin"Invoke-Expression-Command $startEmulatorCmd
Request for Assistance
Could you please advise if there is a method to configure the specific culture of the Azure Cosmos DB Emulator so that it uses a period (.) as the decimal separator, without affecting other applications on my system?
Thank you in advance for your help.
The text was updated successfully, but these errors were encountered:
I would like to add an additional point. I reinstalled version 2.14.12 of the emulator, and with this version, the problem does not occur. By adding the following line to my startup script:
$env:DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
the emulator starts correctly, and the numbers are in US format.
Please take this additional information into account.
Hello,
I am reaching out to seek your assistance regarding an issue I am encountering with the Azure Cosmos DB Emulator.
Problem Description
I am developing a .NET application using Azure Cosmos DB, and when executing Gremlin queries on the Azure Cosmos DB Emulator locally, I encounter the following error:
This error occurs when executing a query containing a decimal number, for example:
.property('field1$.field2', 2.2)
. After several investigations, it seems that this error is related to the emulator's culture configuration, specifically how decimal numbers are interpreted. My development environment uses the French culture, which uses a comma (,
) as the decimal separator instead of a period (.
).Technical Details
Actions Taken
By changing my system's regional settings to en-US, I was able to confirm that the issue is indeed related to the application's culture, as the exception no longer occurs in this configuration. However, I wish to keep my system in French.
To address this issue, I attempted to add the following line in my emulator startup script:
However, for the past few months, adding this line has completely prevented the emulator from starting.
Here's my full script :
Request for Assistance
Could you please advise if there is a method to configure the specific culture of the Azure Cosmos DB Emulator so that it uses a period (
.
) as the decimal separator, without affecting other applications on my system?Thank you in advance for your help.
The text was updated successfully, but these errors were encountered: