avans06 commited on
Commit
2601bfd
1 Parent(s): 86a43ad

Fixed the issue of failure to read options.md.

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -768,8 +768,12 @@ def create_ui(app_config: ApplicationConfig):
768
  optionsMd: str = None
769
  readmeMd: str = None
770
  try:
771
- with open("docs\options.md", "r", encoding="utf-8") as optionsFile:
 
772
  optionsMd = optionsFile.read()
 
 
 
773
  with open("README.md", "r", encoding="utf-8") as readmeFile:
774
  readmeMd = readmeFile.read()
775
  except Exception as e:
 
768
  optionsMd: str = None
769
  readmeMd: str = None
770
  try:
771
+ optionsPath = pathlib.Path("docs/options.md")
772
+ with open(optionsPath, "r", encoding="utf-8") as optionsFile:
773
  optionsMd = optionsFile.read()
774
+ except Exception as e:
775
+ print("Error occurred during read options.md file: ", str(e))
776
+ try:
777
  with open("README.md", "r", encoding="utf-8") as readmeFile:
778
  readmeMd = readmeFile.read()
779
  except Exception as e: