beast icon indicating copy to clipboard operation
beast copied to clipboard

Unicode encoding error on Windows

Open schen70 opened this issue 1 month ago • 1 comments

Using latest development version of beast on Windows, and running the metal-small example, I'm getting this error:

(beast) C:\Users\Steven\Downloads\beast-examples-master\metal_small>python run_beast.py -potf
Padova CMD isochrones
Working on the PARSEC isochrone
Traceback (most recent call last):
  File "C:\Users\Steven\Downloads\beast-examples-master\metal_small\run_beast.py", line 60, in <module>
    create_physicsmodel.create_physicsmodel(
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\beast\tools\run\create_physicsmodel.py", line 72, in create_physicsmodel
    (iso_fname, oiso) = make_iso_table(
                        ^^^^^^^^^^^^^^^
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\beast\physicsmodel\model_grid.py", line 80, in make_iso_table
    t = oiso._get_t_isochrones(max(5.0, logtmin), min(10.13, logtmax), dlogt, z)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\beast\physicsmodel\stars\isochrone.py", line 641, in _get_t_isochrones
    iso_table = self._get_t_isochrones(logtmin, logtmax, dlogt, Z[0])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\beast\physicsmodel\stars\isochrone.py", line 622, in _get_t_isochrones
    iso_table = parsec.get_t_isochrones(
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\beast\physicsmodel\stars\ezpadova\parsec.py", line 562, in get_t_isochrones
    r = ezpadova.get_isochrones(
        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\ezpadova\parsec.py", line 233, in get_isochrones
    validate_query_parameter(**kw)
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\ezpadova\config.py", line 774, in validate_query_parameter
    reload_configuration()
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\site-packages\ezpadova\config.py", line 103, in reload_configuration
    f.write(generate_doc())
  File "C:\Users\Steven\anaconda3\envs\beast\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\u2264' in position 441: character maps to <undefined>

But I am able to get the example to work on Ubuntu (WSL). Is this encoding error related to different encoding standards on the operating systems?

schen70 avatar Oct 31 '25 18:10 schen70

I guess so. I have not encountered this issue before, but have not run the BEAST on a windows machine either.

karllark avatar Oct 31 '25 19:10 karllark