-
Notifications
You must be signed in to change notification settings - Fork 318
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
资产批量导入问题(JSONDecodeError at /assets/simport_assets/ Expecting value: line 1 column 1 (char 0) Request Method: POST Request URL:) #70
Comments
我也遇到过这种问题,求大神帮忙解答 |
首先确认已经在基础配置中提前添加好了对应的机房、机柜、供应商信息,并且模板中填写的这三项中的ID号要与数据库中的ID号一致 |
1.这个肯定是有的,我在未做任何改动的情况下,直接在ubuntu系统里面操作,用ubuntu系统里面的火狐打开ops页面,登陆,导入项目根目录下的模版文件是成功的,数据能进去,但是我打开这个模版文件,只是改了ip和资产编号就导入不了新加的数据了,这是比较奇怪的地方; |
ubuntu系统我没测过,你的Ubuntu系统的默认编码是什么?执行 [root@myecs ~]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL= |
谢谢作者改了代码,我重新拉取安装了以后可以批量导入了。 |
谢谢,这个系统编码我以前也查看过,并无不妥。 |
1.开始在centos里面装好系统,在windows10下直接导入自带的模板,都没有打开过,都不行
2.在ubuntu里面用import_assets也不行,然后搞了一个跟它一模一样的simport_assets,是可以导入,但是打开资产导入模板修改,新增2条新数据,只是改了IP和资产编号,后再导入又不行了;即使不更改资产导入模板能导入,有数据,但是还是有以下错误
UnicodeDecodeError at /assets/simport_assets/ 'utf-8' codec can't decode byte 0x87 in position 235: invalid start byte Request Method: POST Request URL: http://0.0.0.0:8000/assets/simport_assets/ Django Version: 2.0.5 Python Executabl
3.希望大神帮忙解答下,加了编码注释还是不行。
The text was updated successfully, but these errors were encountered: