2015-08-20 72 views
0

嗨,我正在處理一個處理醫療信息的類項目。所以我想到了使用INDIVO服務器。我正在嘗試安裝indivo_ui_server。我收到一個錯誤,我也安裝了模式包。該軟件包包含三個文件和一個init .py。我正試圖安裝在窗口Django'module'object not callable

enter image description here

下面的代碼是urls.py

from django.conf.urls import patterns 
from django.conf.urls.defaults import include 

urlpatterns = patterns('', 
    # HARDCODED APP PATHS!! (keep in alpha order) 
    (r'^apps/allergies/',  include('apps.allergies.urls')), 
    (r'^apps/labs/',   include('apps.labs.urls')), 
    (r'^apps/medications/',  include('apps.medications.urls')), 
    (r'^apps/problems/',  include('apps.problems.urls')), 
    (r'^', include('ui.urls')) # Everything else to indivo 
) 

下面的代碼爲__init__.py(從圖案包裝):

def patterns(func): 
    empty_argspec = inspect.ArgSpec(args=[], varargs=None, keywords=None, defaults=None) 
    assert inspect.getargspec(func) == empty_argspec, 'Pattern function should not have arguments' 

    # TODO: make it not as weird and dirty 
    func.__globals__['Mismatch'] = Mismatch 

    tree = get_ast(func) 
    transform_function(tree.body[0]) 
    return compile_func(func, tree) 

任何人都可以解釋我爲什麼我收到此錯誤。

我自己也嘗試建議,由link 1link 2

回溯:

enter image description here

+1

加滿只導入一切就迎刃而解了traceback和indivo_ui_server.py代碼 –

+0

@TonyRoczz出於好奇,只是t o看看是否是這個問題,你可以嘗試 - 從'django.conf.urls import include'而不是默認值。 –

+0

最後一行沒有多大意義。你是否試圖將主要的urls.py文件包含進它自己? –

回答

0

進口問題是由從urls.py

from django.conf.urls import *