meddwl / psearch

3D ligand-based pharmacophore modeling
BSD 3-Clause "New" or "Revised" License
46 stars 16 forks source link

Windows compatibility #4

Closed hadim closed 3 years ago

hadim commented 3 years ago

While trying to package psearch on conda forge (see https://github.com/conda-forge/staged-recipes/pull/14110), the lib failed to install on windows with the following error:

Traceback (most recent call last):
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\Scripts\psearch-script.py", line 9, in <module>
    sys.exit(entry_point())
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\site-packages\psearch\psearch.py", line 150, in entry_point
    args = vars(parser.parse_args())
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 1818, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 1851, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 2060, in _parse_known_args
    start_index = consume_optional(start_index)
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 2000, in consume_optional
    take_action(action, args, option_string)
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 1928, in take_action
    action(self, namespace, argument_values, option_string)
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 1092, in __call__
    parser.print_help()
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 2548, in print_help
    self._print_message(self.format_help(), file)
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\lib\argparse.py", line 2554, in _print_message
    file.write(message)
  File "C:\Miniconda\conda-bld\psearch_1614360208183\_test_env\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 '\u0441' in position 2786: character maps to <undefined>

This ticket is just to let you know if you want to fix that.

On my side, I will just disable windows for the conda forge package.

I also don't really need it on windows so it's really up to you whether you want to fix it or not. Otherwise, feel free to close.

DrrDom commented 3 years ago

Thank you reporting the issue. I checked and replaced all accidentally occurred cyrillic characters in the code. Hope this will fix the issue. Check it please.

hadim commented 3 years ago

I can't really test it since I don't work on a windows machine (the error comes from the CI of conda forge). Next release will automatically bump a new build on the conda forge package.

DrrDom commented 3 years ago

OK. Then I'll close the issue. Thank you!

hadim commented 3 years ago

Pretty sure the cyrillic chars were the issue anyway. Will keep you in touch for the next release.