-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
operror-type: AssertionError with PyPy plugin on 2.0.4 #628
Comments
I also tried changing the pypy-home to /usr/lib/pypy and got the same issue. As an extra test, I downloaded https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-2.2.1-linux_x86_64-portable.tar.bz2 and had the pypy-home reference "/pypy-2.2.1-linux_x86_64-portable/" in that directory. Same issue. For further testing, I built the standard Python plugin from scratch via "python uwsgiconfig.py --plugin plugins/python" updated the .ini file by removing the pypy- references, and changed the plugin reference from pypy python (python_plugin.so) and it works perfectly. |
that libraries are too old (a year ago). You should rebuild a new libpypy-c.so (we are working on it) or you should use the "alternative" approach described at the end of the docs |
Thanks for the response. Btw when I install PyPy from the Ubuntu repos, it has a lib_pypy folder in /usr/lib/pypy/ and the portable one I linked to also has a lib_pypy folder. Is there a reason that uWSGI cannot use these folders instead of having to require a separate .so file? |
lib_pypy dir has nothing to do with libpypy-c, it is basically the path holding the system python modules, while libpypy-c contains the whole pypy vm (ready to be embedded). Best thing you can do (if you cannot follow the alternative approach) is to build libpypy-c by yourself (about 1 hour of time) |
newer libpypy-c (64bit) is available. In addition to this arch linux started packaging it too. |
I'm still seeing the exact same problem, even with the new file. INI-file: uid=deploy socket = /tmp/uwsgi.sock max-worker-lifetime = 6000 logto = /home/deploy/project/uwsgi.log chdir = /home/deploy/project pypy-wsgi = server:app Log output: *** Starting uWSGI 2.0.6 (64bit) on [Tue Jul 8 08:36:01 2014] *** I'd be happy to provide any additional debug output, just let me know what parts would help. |
I have the same problem with the new file and also with a locally compiled version (although that gives a slightly different output). Ubuntu 12.04 64-bit, pypy is binary downloaded from the pypy website, I tried with pypy compiled by
|
I'm also getting this issue, though it wasn't happening originally and only just started yesterday. Makes no difference which wsgi.py I use. Using the .so from the docs: http://projects.unbit.it/downloads/pypy/libpypy-c-x86_64.so |
@unbit will you reopen the issue or should a new one be created? |
@fijal is working on having official libpypy, i'll post updates here |
Also hitting this issue.
|
The latest official nightly builds of pypy have libpypy built-in by default. We are fixing latest things. 2.0.9 should be easy to use with pypy |
This should be fixed, see http://uwsgi-docs.readthedocs.org/en/latest/PyPy.html . Closing. |
When using uWSGI 2.0.4 standalone and loading the PyPy plugin on Ubuntu 14.04, I get a debug: operror-type: AssertionError when loading any script. I got PyPy 2.2.1 from the repositories via a simple "apt-get install pypy" Here are my steps:
1.) I downloaded from http://projects.unbit.it/downloads/uwsgi-2.0.4.tar.gz, extracted, changed to the uwsgi-2.0.4, and opened up a terminal.
2.) I ran "UWSGI_BIN_NAME=/home/teg/uwsgi_test/uwsgi make PROFILE=nolang" to create a uwsgi executable but not include the default Python. Otherwise I get an issue about loading both Python and PyPy and how it is evil.
3.) While still in the uwsgi-2.0.4 directory in the terminal, I ran "python2.7 uwsgiconfig.py --plugin plugins/pypy" to create a pypy_plugin.so file for which I copied to /home/teg/uwsgi_test/
4.) Changed directories to /home/teg/uwsgi_test/ opened up a terminal, and ran "wget http://projects.unbit.it/downloads/pypy/libpypy-c-x86_64_20130524.so" to get the required file.
5.) Created this .ini file and named conf.ini:
[uwsgi]
plugins = /home/teg/uwsgi_test/pypy
http = :8080
chdir = home/teg/uwsgi_test/
processes = 2
master=true
disable-logging = false
catch-exceptions = false
post-buffering = 8192
vacuum = true
listen = 120
pypy-home = /usr/bin
pypy-lib = /home/teg/uwsgi_test/libpypy-c-x86_64_20130524.so
6.) Created a simple hello.py with this code and put in the /uwsgi_test/ directory:
def application(env, start_response):
start_response('200 OK', [('Content-Type','text/html')])
return ["Hello World"]
7.) Ran the script via "/home/teg/uwsgi_test/uwsgi --ini conf.ini --pypy-wsgi hello.py" in the terminal.
8.) Got this error:
[uWSGI] getting INI configuration from conf.ini
*** Starting uWSGI 2.0.4 (64bit) on [Thu May 15 13:43:23 2014] ***
compiled with version: 4.8.2 on 15 May 2014 12:05:24
os: Linux-3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014
nodename: ubuntu1
machine: x86_64
clock source: unix
detected number of CPU cores: 8
current working directory: /home/teg/uwsgi_test
detected binary path: /home/teg/uwsgi_test/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
your processes number limit is 126913
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uWSGI http bound on :8080 fd 4
uwsgi socket 0 bound to TCP address 127.0.0.1:38360 (port auto-assigned) fd 3
debug: OperationError:
debug: operror-type: AssertionError
debug: operror-value:
Is this a common error that many of you are of or is it a configuration issue? It only seems to affect PyPy and not standard Python when following the docs. There is also someone else with this issue at https://serverfault.com/questions/592413
The text was updated successfully, but these errors were encountered: