ramses-tech / ramses-example

Example of a Pyramid app that uses ramses
The Unlicense
18 stars 6 forks source link

Unable to create new user if `simplejson` installed without speedups #59

Open vlcinsky opened 8 years ago

vlcinsky commented 8 years ago

Running this app on Ubuntu 14.04.4 worked well.

The same app on Ubuntu 16.04 was failing with error

2016-07-23 00:38:16,285 INFO  [ramses.auth][MainThread] auth.create_system_user: Creating system user
2016-07-23 00:38:16,469 ERROR [ramses.auth][MainThread] auth.create_system_user: Failed to create system user. Missing config: '_asdict'
2016-07-23 00:38:16,469 INFO  [ramses][MainThread] __init__.includeme: Server successfully generated

Similar error occurs with attempt to register a new user.

simplejson with speedups helped

Comparing the two installation I found, that with simplejson being installed with speedups the application works. Without speedups it fails.

Anyway, the cause was elsewhere.

nefertari.dictset.__getattrib__ poor implementation

Tracking why simplejson behaves in two different ways I have found, that nefertari.dictset.__getattrib__ implementation was incomplete and raised KeyError when non existent attribute was requested.

The PR https://github.com/ramses-tech/nefertari/pull/143 fixes the problem with dictset. With given fix the ramses-example works well even with simplejson being installed without speedups.

rodrigobaron commented 7 years ago

👍 I got same error here...