Closed NilsBuett closed 4 months ago
Hello Nils, glad you made it here :)
Could you let me know more info about your set-up - which platform, which locale (or LC_NUMERIC
to be exact)?
Hello Peter,
I am working on windows 11 (if that is your question about the platform). I get the following terminal outpurt when I ask about locale.
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
Hi Nils,
That's strange. Are you using WSL to run yadg
? It looks like you only have the en_US
locale installed, but that's also the Linux/UNIX locale, not a Windows one (those are something like English_United States
).
I think the current solution within yadg using the locale
module might not be ideal, as it requires the appropriate locales to be generated, and has side effects. You can generate the German one using:
sudo locale-gen de_DE.UTF-8 en_GB.UTF-8
And then maybe it would work. However, I have an idea on how to fix it properly using babel
instead of locale
.
If possible, could you share the file with me? If you don't want to have it publicly shared, please send it to me at peter.kraus@tu-berlin.de.
Hello Peter,
I have send you an e-mail with the data file.
Thanks Nils, I'll try to have a look as soon as possible.
Hi @NilsBuett, your files should work now. Please try installing the current master version of yadg
, using:
pip install git+https://github.com/dgbowl/yadg.git
and then you should be able to extract your data as a xarray.Dataset
:
from yadg.extractors import extract
ds = extract(filetype="eclab.mpt", path=..., locale="de_DE")
Finally, before closing the issue, please let me know if it works and if I can add your mpt
file into the public test database; if you also have the mpr
file from which the mpt
was generated, that would be very helpful.
Hello Peter,
today I had a deeper view on the results. Unfortunately, the current header name is not given, it is empty. That is for now the only problem I recognized.
@NilsBuett I don't follow - what current header?
@PeterKraus It was my mistake. I have overlooked something. At some files I get and KeyError: "Analog OUT/V"
This may be an Ec-Lab problem that is newer than 11.50...
Analog OUT
is not defined as a known column for mpt files, yet, so the code crashes with a KeyError
. Probably added in 11.50, or we have not seen it in our test files, yet. It's a fairly easy fix, you will have to add it in this file:
Feel free to make a PR!
Hello,
I try doing:
extract(filetype="eclab.mpt", path="myfile.mpt")
and get:
Error: unsupported locale setting
My data file contains data decimal separator as comma. This should be changed to dots.
Thank you in advance :)