I will look closer at the code another programmer on my team wrote it. However when moving the methods from the imported module to the controller and using them doesn't get an error.
On Tue, May 1, 2012 at 6:31 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > One known problem with the custom import is that if there is a bug in the > imported module, you always get an Importerror instead of the proper > more-descriptive error. In you case I do not see what the error may be but > any typo could be causing this. > > > On Monday, 30 April 2012 23:06:51 UTC-5, Bruce Wade wrote: >> >> >> applications/advertisement/**modules/util.py >> from gluon import * >> >> def make_page_breadcrumbs(page_**breadcrumbs_items): >> page_breadcrumbs_items_buffer = [ DIV(SPAN("", >> _class="breadcrumbs-arrow"),**SPAN(crumb)) for crumb in >> page_breadcrumbs_items ] >> return DIV(page_breadcrumbs_items_**buffer) >> >> def make_page_title(page_title, icon): >> return SPAN(IMG(_src=icon), H6(page_title)) >> >> class pageIcon: >> UNION = "/advertisement/static/images/**union_icon_55x55.png" >> >> controllers/union.py >> def index(): >> from util import make_page_title >> ... >> >> Error: >> >> Traceback (most recent call last): >> >> File >> "/home/bruce/Development/**bossteam_dev/projects/yaw_dev/**gluon/restricted.py", >> line 205, in restricted >> >> exec ccode in environment >> >> File >> "/home/bruce/Development/**bossteam_dev/projects/yaw_dev/**applications/advertisement/**controllers/union.py" >> <http://127.0.0.1:8000/admin/edit/advertisement/controllers/union.py>, line >> 346, in <module> >> >> File >> "/home/bruce/Development/**bossteam_dev/projects/yaw_dev/**gluon/globals.py", >> line 173, in <lambda> >> >> self._caller = lambda f: f() >> >> File >> "/home/bruce/Development/**bossteam_dev/projects/yaw_dev/**gluon/tools.py", >> line 2575, in f >> >> return action(*a, **b) >> >> File >> "/home/bruce/Development/**bossteam_dev/projects/yaw_dev/**applications/advertisement/**controllers/union.py" >> <http://127.0.0.1:8000/admin/edit/advertisement/controllers/union.py>, line >> 5, in index >> >> from util import make_page_title >> >> ImportError: cannot import name make_page_title >> >> I have no idea why in the world this is happening, any suggestions? >> -- >> -- >> Regards, >> Bruce Wade >> http://ca.linkedin.com/in/**brucelwade<http://ca.linkedin.com/in/brucelwade> >> http://www.wadecybertech.com >> http://www.fittraineronline.**com <http://www.fittraineronline.com> - >> Fitness Personal Trainers Online >> http://www.warplydesigned.com >> >> -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com