Alexander-Nasuta / graph-jsp-env

A gymnasium environment for the job shop problem using the disjunctive graph approach
MIT License
20 stars 4 forks source link

import not working on windows because of the banner #3

Open nhuet opened 4 days ago

nhuet commented 4 days ago

Hi, i tried your library on different plateform and discovered that the banner prevented me to import it on windows because of encoding issues:

tests\solvers\python\test_gnn_sb3.py:7: in <module>
    from graph_jsp_env.disjunctive_graph_jsp_env import DisjunctiveGraphJspEnv
C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\site-packages\graph_jsp_env\disjunctive_graph_jsp_env.py:12: in <module>
    from graph_jsp_env.disjunctive_graph_jsp_visualizer import DisjunctiveGraphJspVisualizer
C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\site-packages\graph_jsp_env\disjunctive_graph_jsp_visualizer.py:19: in <module>
    from graph_jsp_env.disjunctive_graph_logger import log
C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\site-packages\graph_jsp_env\disjunctive_graph_logger.py:11: in <module>
    print(small_banner if w < 140 else big_banner)
C:\hostedtoolcache\windows\Python\3.12.7\x64\Lib\encodings\cp1252.py:19: in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
E   UnicodeEncodeError: 'charmap' codec can't encode characters in position 233-237: character maps to <undefined>
Alexander-Nasuta commented 4 days ago

Hi, could you share a minimal code snippet, so I can reproduce it? I'll try to reproduce it on a windows machine of mine next week.

nhuet commented 3 days ago

Very simple :) :

from graph_jsp_env.disjunctive_graph_jsp_env import DisjunctiveGraphJspEnv

It crashes when trying to display the banner. Tested on windows-latest github runner.