33 lines
923 B
Python
33 lines
923 B
Python
#!/usr/bin/env python
|
|
"""
|
|
Script to check Python path and help diagnose import issues.
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
|
|
def main():
|
|
print("Current working directory:", os.getcwd())
|
|
print("\nPython path:")
|
|
for path in sys.path:
|
|
print(f" - {path}")
|
|
|
|
print("\nChecking for app directory:")
|
|
if os.path.exists("app"):
|
|
print("✅ 'app' directory exists in current working directory")
|
|
print("Contents of app directory:")
|
|
for item in os.listdir("app"):
|
|
print(f" - {item}")
|
|
else:
|
|
print("❌ 'app' directory does not exist in current working directory")
|
|
|
|
print("\nChecking for app module:")
|
|
try:
|
|
import app
|
|
print("✅ 'app' module can be imported")
|
|
print(f"app module location: {app.__file__}")
|
|
except ImportError as e:
|
|
print(f"❌ Cannot import 'app' module: {e}")
|
|
|
|
if __name__ == "__main__":
|
|
main() |