JamesSG2 / Handwriting-Conversion-Application

This app would take in multiple images of a persons handwriting and then analyze those images (using AI software) in order to create a simulator that would then be able to output your personal handwriting as you type on a keyboard.
7 stars 0 forks source link

GUI Error #30

Closed rover-t closed 3 years ago

rover-t commented 3 years ago

@BigWub67 I tried to run you GUI code by running the main.py file from the command line. I got an error that seems to have to do with how you are setting directories. Here is the text of the error:

PS C:\Users\trevo\github\Handwriting-Conversion-Application\src> python .\main.py
Traceback (most recent call last):
  File ".\main.py", line 4, in <module>
    main()
  File "C:\Users\trevo\github\Handwriting-Conversion-Application\src\GUI\appGUI.py", line 49, in main
    root = HandwritingApp()
  File "C:\Users\trevo\github\Handwriting-Conversion-Application\src\GUI\appGUI.py", line 25, in __init__
    self.searchProfiles()
  File "C:\Users\trevo\github\Handwriting-Conversion-Application\src\GUI\appGUI.py", line 44, in searchProfiles
    self.profileList = [ item for item in os.listdir(root) if os.path.isdir(os.path.join(root, item)) ]
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'output'

I think the error is actually beginning on the previous line where root='output'. If I'm am understanding the situation correctly in your code the initial directory is assumed to be the project folder which contains src, output, etc. I am assuming this would happen if you are running the project from an IDE. However Jame's and my code is written with the initial directory being within the src folder which is where it is when the code is run directly from the command line. I am able to resolve this issue temporarily by using os.chdir("..") in the appGUI.py main() function.

rover-t commented 3 years ago

An alternate solution is when running the code from the comandline using ...Conversion-Application> python .\src\main.py instead of ...src> python .\main.py

I'll use this for now. I'm going through and finding issues with the integration and doing my best to find solutions to correct them.