'Why does Virtual Studio code keep failing to fine file or directory in python
I run my code in Pythons build in IDLE Shell and it will run no problem. But once it is in virtual studio it then throws this error code.
I have gone into my Python Extension settings and have checked the 'Execute In File Dir' like multiple other posts and fixes say, but it does not seem to resolve my issue.
Error:
Traceback (most recent call last):
File "c:\Users\dpr48\OneDrive\Desktop\Python\FINAL PROJECT\Versions\v1.0.0\Cipher Text -
v1.0.0\CipherText-v1.0.0.py", line 27, in <module>
mainwindow = MainMenu()
File "c:\Users\dpr48\OneDrive\Desktop\Python\FINAL PROJECT\Versions\v1.0.0\Cipher Text -
v1.0.0\CipherText-v1.0.0.py", line 17, in __init__
loadUi('MainMenu.ui', 'r', self)
File "C:\Users\dpr48\AppData\Local\Programs\Python\Python39\lib\site-
packages\PyQt5\uic\__init__.py", line 238, in loadUi
return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix)
File "C:\Users\dpr48\AppData\Local\Programs\Python\Python39\lib\site-
packages\PyQt5\uic\Loader\loader.py", line 66, in loadUi
File "C:\Users\dpr48\AppData\Local\Programs\Python\Python39\lib\site-
packages\PyQt5\uic\uiparser.py", line 1020, in parse
document = parse(filename)
File "C:\Users\dpr48\AppData\Local\Programs\Python\Python39\lib\xml\etree\ElementTree.py",
line 1229, in parse
tree.parse(source, parser)
File "C:\Users\dpr48\AppData\Local\Programs\Python\Python39\lib\xml\etree\ElementTree.py",
line 569, in parse
source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: 'MainMenu.ui'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
