Skip to content

Commit

Permalink
(core) explicitly encode __str__ printout as utf-8 to help Windows …
Browse files Browse the repository at this point in the history
…compatibility
  • Loading branch information
amkrajewski committed Feb 13, 2024
1 parent 11d0457 commit 952c4bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pysipfenn/core/pysipfenn.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def __str__(self):
"""Prints the status of the ``Calculator`` object."""
printOut = f'pySIPFENN Calculator Object. Version: {__version__}\n'
printOut += f'Models are located in:\n {resources.files("pysipfenn.modelsSIPFENN")}\n'
printOut += f'Auxiliary files (incl. structure prototypes):\n {resources.files("pysipfenn.misc")}\n{"-" * 80}\n'
printOut += f'Auxiliary files (incl. structure prototypes):\n {resources.files("pysipfenn.misc")}\n{"-"*80}\n'
printOut += f'Loaded Networks: {list(self.loadedModels.keys())}\n'
if len(self.inputFiles) > 0:
printOut += f'Last files selected as input: {len(self.inputFiles)}\n'
Expand All @@ -123,7 +123,7 @@ def __str__(self):
if len(self.predictions) > 0:
printOut += f'Last prediction run on: {len(self.predictions)} structures\n'
printOut += f' {len(self.predictions[0])} predictions/structure\n'
return printOut
return printOut.encode('utf-8')

# ********************************* PROTOTYPE HANDLING *********************************
def parsePrototypeLibrary(self,
Expand Down

0 comments on commit 952c4bc

Please sign in to comment.