Crossbar 0.12.1 : No module named django

82 views
Skip to first unread message

Jonas Turbeaux

unread,
Feb 9, 2016, 7:43:31 AM2/9/16
to Crossbar
I get an error while i launch crossbar 0.12.1 that I did not have with the version 0.11.
I opened a topic on Stackoverflow :

I http://stackoverflow.com/questions/35290280/crossbar-0-12-1-no-module-named-django

Many Thanks for your work !

Jonas Turbeaux

unread,
Feb 11, 2016, 7:10:27 AM2/11/16
to Crossbar
Hi !

Same problem here with your wsgi tutorial and crossbar 0.12.1 :
http://crossbar.io/docs/WSGI-Host-Service/

" WSGI app module 'myapp' import failed: No module named flask "






2016-02-11T12:05:51+0000 [Router        170] NativeWorkerSession.onUserError
Traceback (most recent call last):
 
File "/opt/crossbar/site-packages/autobahn/twisted/websocket.py", line 165, in _onMessage
   
self.onMessage(payload, isBinary)
 
File "/opt/crossbar/site-packages/autobahn/wamp/websocket.py", line 90, in onMessage
   
self._session.onMessage(msg)
 
File "/opt/crossbar/site-packages/autobahn/wamp/protocol.py", line 755, in onMessage
    on_reply
= txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)
 
File "/opt/crossbar/site-packages/txaio/tx.py", line 339, in as_future
   
return maybeDeferred(fun, *args, **kwargs)
--- <exception caught here> ---
 
File "/opt/crossbar/site-packages/twisted/internet/defer.py", line 150, in maybeDeferred
    result
= f(*args, **kw)
 
File "/opt/crossbar/site-packages/crossbar/worker/router.py", line 795, in start_router_transport
    root
= self._create_resource(root_config, nested=False)
 
File "/opt/crossbar/site-packages/crossbar/worker/router.py", line 969, in _create_resource
   
raise ApplicationError(u"crossbar.error.invalid_configuration", "WSGI app module '{}' import failed: {} - Python search path was {}".format(mod_name, e, sys.path))
autobahn
.wamp.exception.ApplicationError: ApplicationError(error=<crossbar.error.invalid_configuration>, args=["WSGI app module 'myapp' import failed: No module named flask - Python search path was [u'/root/flask', '/opt/crossbar/site-packages/crossbar/worker', '/usr/bin', '/opt/crossbar/lib_pypy/__extensions__', '/opt/crossbar/lib_pypy', '/opt/crossbar/lib-python/2.7', '/opt/crossbar/lib-python/2.7/lib-tk', '/opt/crossbar/lib-python/2.7/plat-linux2', '/opt/crossbar/site-packages']"], kwargs={}, enc_algo=None)

2016-02-11T12:05:51+0000 [Controller    165] crossbar.error.invalid_configuration: WSGI app module 'myapp' import failed: No module named flask - Python search path was [u'/root/flask', '/opt/crossbar/site-packages/crossbar/worker', '/usr/bin', '/opt/crossbar/lib_pypy/__extensions__', '/opt/crossbar/lib_pypy', '/opt/crossbar/lib-python/2.7', '/opt/crossbar/lib-python/2.7/lib-tk', '/opt/crossbar/lib-python/2.7/plat-linux2', '/opt/crossbar/site-packages']






Can you reproduce this error or i'm the only one ?
I work within a clean docker install, with python 2.7.

Many Thanks !

Tobias Oberstein

unread,
Feb 11, 2016, 6:35:53 PM2/11/16
to cross...@googlegroups.com
Jonas,

I'll look tomorrow. Promise;) Need to get some sleep ..

Cheers,
/Tobias
> --
> You received this message because you are subscribed to the Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crossbario+...@googlegroups.com
> <mailto:crossbario+...@googlegroups.com>.
> To post to this group, send email to cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/ebd5c1e7-c867-429d-82ff-708cb804edc6%40googlegroups.com
> <https://groups.google.com/d/msgid/crossbario/ebd5c1e7-c867-429d-82ff-708cb804edc6%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Jonas Turbeaux

unread,
Feb 12, 2016, 5:53:38 AM2/12/16
to cross...@googlegroups.com
Thanks Tobias, no problem ! Take your time, i'm not in a hurry :) I Still look for my side, others say that they are unable to reproduce the error with flask. I'm just puzzled :)
Many thanks again :)


--
You received this message because you are subscribed to a topic in the Google Groups "Crossbar" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/crossbario/8loiCTKr4Fw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/56BD1AD5.4000906%40gmail.com.

Tobias Oberstein

unread,
Feb 12, 2016, 6:24:35 AM2/12/16
to cross...@googlegroups.com
Hi Jonas,

funny, just that minute I added a WSGI example:

https://github.com/crossbario/crossbarexamples/tree/master/wsgi

Works for me with CB trunk (and should work with release also, with
slight config file mods).

--

Rgd Django:

The
https://github.com/crossbario/crossbarexamples/tree/master/django/realtimemonitor
for the Django/Crossbar.io tutorial
http://crossbar.io/docs/Adding-Real-Time-to-Django-Applications/ works
for me out of the box.


So .. mmh. Can't reproduce your issue =(

Cheers,
/Tobias


Am 12.02.2016 um 11:53 schrieb Jonas Turbeaux:
> Thanks Tobias, no problem ! Take your time, i'm not in a hurry :) I
> Still look for my side, others say that they are unable to reproduce the
> error with flask. I'm just puzzled :)
> Many thanks again :)
>
>
> 2016-02-12 0:35 GMT+01:00 Tobias Oberstein <tobias.o...@gmail.com
> <mailto:tobias.o...@gmail.com>>:
>
> Jonas,
>
> I'll look tomorrow. Promise;) Need to get some sleep ..
>
> Cheers,
> /Tobias
>
> Am 09.02.2016 um 13:43 schrieb Jonas Turbeaux:
>
> I get an error while i launch crossbar 0.12.1 that I did not
> have with
> the version 0.11.
> I opened a topic on Stackoverflow :
>
> I
> http://stackoverflow.com/questions/35290280/crossbar-0-12-1-no-module-named-django
>
> Many Thanks for your work !
>
> --
> You received this message because you are subscribed to the Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving emails from
> it, send
> an email to crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>
> <mailto:crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>
> <mailto:cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/ebd5c1e7-c867-429d-82ff-708cb804edc6%40googlegroups.com
> <https://groups.google.com/d/msgid/crossbario/ebd5c1e7-c867-429d-82ff-708cb804edc6%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in
> the Google Groups "Crossbar" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/crossbario/8loiCTKr4Fw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>.
> To post to this group, send email to cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>.
> To view this discussion on the web visit
> --
> You received this message because you are subscribed to the Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crossbario+...@googlegroups.com
> <mailto:crossbario+...@googlegroups.com>.
> To post to this group, send email to cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/CABAV-1%3DOzfeqwHmqg7uBxg9Bf0ezJPWuSujOWy%2BiGeZ6MZCB0g%40mail.gmail.com
> <https://groups.google.com/d/msgid/crossbario/CABAV-1%3DOzfeqwHmqg7uBxg9Bf0ezJPWuSujOWy%2BiGeZ6MZCB0g%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Jonas Turbeaux

unread,
Feb 12, 2016, 6:53:06 AM2/12/16
to cross...@googlegroups.com
Thanks Tobias, i will try it.
I'm confused that i'm the only one with this error... Very strange cause i work with a clean environment through docker.
I see that your exemple use the 0.13 version of crossbar. You get the same result with the 0.12.1 i guess ?
Many thanks again for your work. It's amazing , i expected this kind of tools since a long time. Good luck :)

To unsubscribe from this group and all its topics, send an email to crossbario+...@googlegroups.com.
To post to this group, send email to cross...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/crossbario/56BDC0F0.9000106%40gmail.com.

Jonas Turbeaux

unread,
Feb 16, 2016, 10:11:13 AM2/16/16
to cross...@googlegroups.com
I have updated the stackoverflow. here my solution :

I work with Docker in order to have a clean environment.
The Dockerfile here : http://crossbar.io/docs/Installation-on-Docker/ seem broken :

    ImportError: No module named setuptools_ext
   
    ----------------------------------------
    Cleaning up...
    Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-VfPnRU/pynacl
    Storing debug log for failure in /root/.pip/pip.log
    The command '/bin/sh -c pip install crossbar[all]' returned a non-zero code: 1

it seem solved with :

    RUN pip install --upgrade cffi

Before RUN pip install crossbar[all]

With this Environment, my problem are solved :)
Don't know why i get this error before, but it's work.

Many thanks to all here and to indexerror, the "french python stackoverflow" :)

http://indexerror.net/3380/crossbar-0-12-1-wsgi-error-no-module-named-django?show=3415




P.S.

Here the clean Dockerfile i use :

    # to build this container:
    # docker build -t crossbar .
    FROM debian:jessie
   
    RUN apt-get update && apt-get -y install build-essential libssl-dev libffi-dev libreadline-dev libbz2-dev libsqlite3-dev libncurses5-dev python-pip python-dev
    RUN pip install --upgrade cffi
    RUN pip install crossbar[all]

Tobias Oberstein

unread,
Feb 16, 2016, 3:11:22 PM2/16/16
to cross...@googlegroups.com
Hi Jonas,

hooray, glad you solved the issue and got it working. Thanks for
reporting back! Much appreciated. I filed:
https://github.com/crossbario/crossbardocs/issues/61

Cheers,
/Tobias
> <mailto:jtur...@gmail.com>>:
>
> Thanks Tobias, i will try it.
> I'm confused that i'm the only one with this error... Very strange
> cause i work with a clean environment through docker.
> I see that your exemple use the 0.13 version of crossbar. You get
> the same result with the 0.12.1 i guess ?
> Many thanks again for your work. It's amazing , i expected this kind
> of tools since a long time. Good luck :)
>
> 2016-02-12 12:24 GMT+01:00 Tobias Oberstein
> <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>>:
>
> Hi Jonas,
>
> funny, just that minute I added a WSGI example:
>
> https://github.com/crossbario/crossbarexamples/tree/master/wsgi
>
> Works for me with CB trunk (and should work with release also,
> with slight config file mods).
>
> --
>
> Rgd Django:
>
> The
> https://github.com/crossbario/crossbarexamples/tree/master/django/realtimemonitor
> for the Django/Crossbar.io tutorial
> http://crossbar.io/docs/Adding-Real-Time-to-Django-Applications/
> works for me out of the box.
>
>
> So .. mmh. Can't reproduce your issue =(
>
> Cheers,
> /Tobias
>
>
> Am 12.02.2016 um 11:53 schrieb Jonas Turbeaux:
>
> Thanks Tobias, no problem ! Take your time, i'm not in a
> hurry :) I
> Still look for my side, others say that they are unable to
> reproduce the
> error with flask. I'm just puzzled :)
> Many thanks again :)
>
>
> 2016-02-12 0:35 GMT+01:00 Tobias Oberstein
> <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>
> <mailto:tobias.o...@gmail.com
> <mailto:tobias.o...@gmail.com>>>:
>
> Jonas,
>
> I'll look tomorrow. Promise;) Need to get some sleep ..
>
> Cheers,
> /Tobias
>
> Am 09.02.2016 um 13:43 schrieb Jonas Turbeaux:
>
> I get an error while i launch crossbar 0.12.1 that
> I did not
> have with
> the version 0.11.
> I opened a topic on Stackoverflow :
>
> I
> http://stackoverflow.com/questions/35290280/crossbar-0-12-1-no-module-named-django
>
> Many Thanks for your work !
>
> --
> You received this message because you are
> subscribed to the Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving
> emails from
> it, send
> an email to crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>
> <mailto:crossbario%2Bunsu...@googlegroups.com
> <mailto:crossbario%252Buns...@googlegroups.com>>
> <mailto:crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>
> <mailto:crossbario%2Bunsu...@googlegroups.com
> <mailto:crossbario%252Buns...@googlegroups.com>>>.
> To post to this group, send email to
> cross...@googlegroups.com <mailto:cross...@googlegroups.com>
> <mailto:cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>>
> <mailto:cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>
> <mailto:cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/ebd5c1e7-c867-429d-82ff-708cb804edc6%40googlegroups.com
>
> <https://groups.google.com/d/msgid/crossbario/ebd5c1e7-c867-429d-82ff-708cb804edc6%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
> https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to
> a topic in
> the Google Groups "Crossbar" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/crossbario/8loiCTKr4Fw/unsubscribe.
> To unsubscribe from this group and all its topics, send
> an email to
> crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>
> <mailto:crossbario%2Bunsu...@googlegroups.com
> <mailto:crossbario%252Buns...@googlegroups.com>>.
> To post to this group, send email to
> cross...@googlegroups.com <mailto:cross...@googlegroups.com>
> <mailto:cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/56BD1AD5.4000906%40gmail.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the
> Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving emails
> from it, send
> an email to crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>
> <mailto:crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to
> cross...@googlegroups.com <mailto:cross...@googlegroups.com>
> <mailto:cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/CABAV-1%3DOzfeqwHmqg7uBxg9Bf0ezJPWuSujOWy%2BiGeZ6MZCB0g%40mail.gmail.com
> <https://groups.google.com/d/msgid/crossbario/CABAV-1%3DOzfeqwHmqg7uBxg9Bf0ezJPWuSujOWy%2BiGeZ6MZCB0g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic
> in the Google Groups "Crossbar" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/crossbario/8loiCTKr4Fw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email
> to crossbario+...@googlegroups.com
> <mailto:crossbario%2Bunsu...@googlegroups.com>.
> To post to this group, send email to cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>.
> To view this discussion on the web visit
> --
> You received this message because you are subscribed to the Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to crossbario+...@googlegroups.com
> <mailto:crossbario+...@googlegroups.com>.
> To post to this group, send email to cross...@googlegroups.com
> <mailto:cross...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/crossbario/CABAV-1mt327jFGS15cabUZ_wFaqdwGDo4ghfoYqEL9N5pZep3w%40mail.gmail.com
> <https://groups.google.com/d/msgid/crossbario/CABAV-1mt327jFGS15cabUZ_wFaqdwGDo4ghfoYqEL9N5pZep3w%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages