----- Oryginalna wiadomość -----
> Od: "Roberto De Ioris" <[email protected]>
> Do: "uWSGI developers and users list" <[email protected]>
> Wysłane: sobota, 15 październik 2011 21:25:19
> Temat: Re: [uWSGI] Embedding uWSGI
> 
> 
> > Have followed the instructions:
> > http://projects.unbit.it/uwsgi/wiki/EmbedFlask
> >
> > *** Starting uWSGI 1.0-dev-1577 (32bit) on [Sat Oct 15 21:15:52
> > 2011] ***
> > Python version: 3.2 (r32:88445, Mar 25 2011, 19:26:27)  [GCC 4.5.2]
> >
> >
> > buildconf/test.ini
> > [uwsgi]
> > inherit = default
> > bin_name = test_bin
> > embed_files = bootstrap.py,mytest=mytest
> >
> >
> > python3 uwsgiconfig.py --build test
> >
> >
> > Where "mytest" is a directory containing __init__.py, and other
> > files.
> > Looking in the directory "build" it seems that correctly found and
> > processed.
> > Binary has been created correctly. Compiling without problems.
> >
> >
> > ./test_bin --http :5000 -w start
> >
> > Python main interpreter initialized at 0xa0836a8
> > your server socket listen backlog is limited to 100 connections
> > *** Operational MODE: single process ***
> > Traceback (most recent call last):
> >   File "./start.py", line 3, in <module>
> >     import mytest
> > ImportError: No module named mytest
> > unable to load app 0 (mountpoint='') (callable not found or import
> > error)
> > *** no app loaded. going in full dynamic mode ***
> >
> >
> > I would like to embed the library "mytest" to uwsgi. But it seems
> > that I
> > can not use it later.
> > What am I doing wrong?
> >
> >
> >
> 
> you have to run bootstrap.py (it will enable the symbol importer)
> 
> --import sym://bootstrap_py
> 
> should be enough
> 

nothing has changed


> 
> or you can add this lines in start.py:
> 
> import sys
> import uwsgi
> 
> sys.meta_path.insert(0, uwsgi.SymbolsImporter())
> 
> 


your server socket listen backlog is limited to 100 connections
*** Operational MODE: single process ***
Traceback (most recent call last):
  File "./start2.py", line 4, in <module>
    sys.meta_path.insert(0, uwsgi.SymbolsImporter())
AttributeError: 'module' object has no attribute 'SymbolsImporter'
unable to load app 0 (mountpoint='') (callable not found or import error)



-- 
Łukasz Wróblewski
http://www.nri.pl/ - Nowoczesne Rozwiązania Internetowe
http://www.hostowisko.pl/ - Profesjonalny i tani hosting
http://www.katalog-polskich-firm.pl/ - Najlepszy darmowy katalog firm
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to