I’m having some trouble in ex.52 with some import errors.
First my directory structure:
My import commands in tests and files are these:
from nose.tools import * from gothonweb.planisphere import *
from nose.tools import * from gothonweb.app import *
from flask import Flask, session, redirect, url_for, escape, request from flask import render_template from gothonweb import planisphere
Now, with imports like these i can run tests perfectly with:
from the /tests directory. The problem is i can’t run the app.py file. When I go cd … and then ‘python app.py’ i get import error:
file 'app.py' from gothonweb import planisphere ImportError
I can change the import commands for this to work but then my tests will have an import error. I tried ‘$env:PYTHONPATH = “$env:PYTHONPATH;.”’ but still not working.
I haven’t been able to fix this.
Where is my mistake?