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

非管理员添加部分任务时报错 #34

Closed
jat001 opened this issue Mar 10, 2013 · 3 comments
Closed

非管理员添加部分任务时报错 #34

jat001 opened this issue Mar 10, 2013 · 3 comments

Comments

@jat001
Copy link
Contributor

jat001 commented Mar 10, 2013

非管理员添加部分任务时会报以下错误:
Traceback (most recent call last):
File ".../python2.7/site-packages/tornado/web.py", line 985, in wrapper
return callback(_args, *_kwargs)
File ".../libs/util.py", line 62, in on_pipe_result
raise ret
UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)

而管理员添加相同任务时则不会报错。
管理员添加任务后,普通用户提交相同任务,无异常。

@jat001
Copy link
Contributor Author

jat001 commented Mar 11, 2013

把 default_group_permission 的 need_miaoxia 改为 False 就好了,这是为什么呢?

@binux
Copy link
Owner

binux commented Mar 12, 2013

url有中文吧

@jat001
Copy link
Contributor Author

jat001 commented Mar 12, 2013

没有中文的也有问题,但管理员添加相同的任务就没问题。
应该是 add_task.py 中的

        result, task = yield gen.Task(self.call_subprocess,
                partial(self.task_manager.add_task, btfile or url, title, tags, email, anonymous,
                                                    self.has_permission("need_miaoxia")))

有问题吧

@binux binux closed this as completed in b86a4a5 Mar 14, 2013
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

2 participants