Skip to content
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

Create account with API give an Internal Server Error #1382

Closed
dragonofmercy opened this issue Sep 15, 2015 · 6 comments
Closed

Create account with API give an Internal Server Error #1382

dragonofmercy opened this issue Sep 15, 2015 · 6 comments

Comments

@dragonofmercy
Copy link

Hello I have this error log when I try to create an account with the API.

2015-09-15 14:06:55,992 [ERROR] django.request:210 handle_uncaught_exception Internal Server Error: /api2/accounts/myemail@gmail.com/
Traceback (most recent call last):
File "/cloud/seafile-server-4.3.2/seahub/thirdpart/Django-1.5.12-py2.6.egg/django/core/handlers/base.py", line 113, in get_response
response = callback(request, _callback_args, *_callback_kwargs)
File "/cloud/seafile-server-4.3.2/seahub/thirdpart/Django-1.5.12-py2.6.egg/django/views/generic/base.py", line 68, in view
return self.dispatch(request, _args, *_kwargs)
File "/cloud/seafile-server-4.3.2/seahub/thirdpart/Django-1.5.12-py2.6.egg/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(_args, *_kwargs)
File "/cloud/seafile-server-4.3.2/seahub/thirdpart/rest_framework/views.py", line 363, in dispatch
response = self.handle_exception(exc)
File "/cloud/seafile-server-4.3.2/seahub/thirdpart/rest_framework/views.py", line 360, in dispatch
response = handler(request, _args, *_kwargs)
File "/cloud/seafile-server-4.3.2/seahub/seahub/api2/views.py", line 374, in put
return self._create_account(request, email)
File "/cloud/seafile-server-4.3.2/seahub/seahub/api2/views.py", line 291, in _create_account
copy = request.DATA.copy()
AttributeError: 'NoneType' object has no attribute 'copy'
2015-09-15 14:06:55,995 [WARNING] django.request:152 process_view Forbidden (Referer checking failed - no Referer.): /api2/accounts/myemail@gmail.com/

@shoeper
Copy link
Collaborator

shoeper commented Sep 15, 2015

2015-09-15 14:06:55,995 [WARNING] django.request:152 process_view Forbidden (Referer checking failed - no Referer.)

@dragonofmercy
Copy link
Author

The problem is not the warning, its the ERROR

@shoeper
Copy link
Collaborator

shoeper commented Sep 15, 2015

Ok sorry. It could be some problem with encoding, but I don't know more about this.

@dragonofmercy
Copy link
Author

I have try with the pro version, same problem, below the request I use:

PUT /api2/accounts/test@test.com/?password=pass&is_staff=0&is_active=1 HTTP/1.1
Host: cloud.myhost.com
Accept: */*
Connection: close
Accept-encoding: gzip, deflate
User-Agent: Ace_Http_Client
Authorization: Token mytoken
Content-Length: 0
Content-Type: application/x-www-form-urlencoded

@xiez
Copy link
Contributor

xiez commented Sep 30, 2015

hi, your request arguments should in -d "password=...", for details, plz refer to http://manual.seafile.com/develop/web_api.html#create-account

@dragonofmercy
Copy link
Author

Ok I found ! its a problem with Zend_Http_Client_Adapter_Curl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants