You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.
This issue doesn’t occur when I try to use it with PyCharm But With VS Code has problem
System
Main system
Test system using different IDE
Test system using different platform
macOS
macOS
Windows 11 Arm
VS Code
Pycharm
VS Code
Description
Understanding the Problem
Port Conflict: As I mentioned, common port usage by VS Code extensions and macOS(3000, 5000, etc) can lead to conflicts. I've Identified can use port 5001 in both systems.
Configuration File Issue: The Inability to access the application suggests the configuration file config.example.ini might not be read correctly due to a path issue.
Path Handling Differences: While PyCharm and VS Code handle paths slightly differently.
Screenshot 1 - using port 5000 both PyCharm and VS Code on macOS
Screenshot 2 - using port 5001 with VS Code on macOS
ErrorCode: FileNotFoundError
Screenshot 3 - using port 5001 with PyCharm on macOS
Solutions
Verify Port Usage:
Use alternative port ex: 5001, 5002 etc.
To avoid error code added code to check platform then if windows, use 5000 and macOS/Linux use 5002
Resolve Configuration File Path:
Screenshot 4 - problem with relative path with VS Code on macOS
can you include the specific error message and/or a screenshot? Have you triaged which area of the code is likely to be affected?
@rafrafavi I added more information to the top page with screenshots. And also find which area of code will be affected. Could you please have a look for me?
Try changing your port number to 5001 since 5000 might already be in use python run app.py --port 5001
@adikal25 Yes, I am using 5001 and 5002 instead of 5000 to run the app. And I thought if the app found macOS or Linux straightaway run 5001 or 5002 instead of run 5000 with error. How do you think?
can you include the specific error message and/or a screenshot? Have you triaged which area of the code is likely to be affected?
@rafrafavi I added more information to the top page with screenshots. And also find which area of code will be affected. Could you please have a look for me?
Try changing your port number to 5001 since 5000 might already be in use python run app.py --port 5001
@adikal25 Yes, I am using 5001 and 5002 instead of 5000 to run the app. And I thought if the app found macOS or Linux straightaway run 5001 or 5002 instead of run 5000 with error. How do you think?
@rafrafavi with this code it should solve the above problem
if name == 'main':
port = 5000
if os.name == 'posix':
port = 5001 # or 5002 as needed
app.run(port=port)
Note
This issue doesn’t occur when I try to use it with PyCharm
But With VS Code has problem
System
Description
Understanding the Problem
config.example.ini
might not be read correctly due to a path issue.Screenshot 1 - using port 5000 both PyCharm and VS Code on macOS
Screenshot 2 - using port 5001 with VS Code on macOS
ErrorCode:
FileNotFoundError
Screenshot 3 - using port 5001 with PyCharm on macOS
Solutions
Screenshot 4 - problem with relative path with VS Code on macOS
app.py
utils.py
The text was updated successfully, but these errors were encountered: