当前位置:网站首页>[problem solving] 'ASCII' codec can't encode characters in position XX XX: ordinal not in range (128)
[problem solving] 'ASCII' codec can't encode characters in position XX XX: ordinal not in range (128)
2022-04-23 20:12:00 【Ricce】
Problem description
I'm using it today Python Call Baidu map API return JSON The following problems have been encountered during data processing :
'ascii' codec can't encode characters in position xx-xx: ordinal not in range(128)
Solution
At first, I thought there was a problem with the returned data , Later, after step-by-step investigation, it was found that it was built by itself URL There is a problem with the parameters ,URL If you want to appear in Chinese , Need to transcode Chinese :
Python:
urllib.parse.quote(value)
Java:
java.net.URLEncoder.encode("value",“utf-8")
版权声明
本文为[Ricce]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204232012129305.html
边栏推荐
- Introduction to electron Tutorial 4 - switching application topics
- Electron入门教程4 —— 切换应用的主题
- Intersection calculation of straight line and plane in PCL point cloud processing (53)
- R language uses the preprocess function of caret package for data preprocessing: BoxCox transform all data columns (convert non normal distribution data columns to normal distribution data and can not
- Leetcode dynamic planning training camp (1-5 days)
- Cadence OrCAD capture batch change component packaging function introduction graphic tutorial and video demonstration
- Project training of Software College of Shandong University - Innovation Training - network security shooting range experimental platform (V)
- Mysql database backup scheme
- Software College of Shandong University Project Training - Innovation Training - network security shooting range experimental platform (8)
- nc基础用法3
猜你喜欢
Kubernetes entry to mastery - bare metal loadbalance 80 443 port exposure precautions
PCL点云处理之计算两平面交线(五十一)
SIGIR'22 "Microsoft" CTR estimation: using context information to promote feature representation learning
【文本分类案例】(4) RNN、LSTM 电影评价倾向分类,附TensorFlow完整代码
Grafana shares links with variable parameters
selenium. common. exceptions. WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT
aqs的学习
【webrtc】Add x264 encoder for CEF/Chromium
【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
Scrum Patterns之理解各种团队模式
随机推荐
Why is the hexadecimal printf output of C language sometimes with 0xff and sometimes not
nc基础用法1
Remote code execution in Win 11 using wpad / PAC and JScript 1
Design of library management database system
SRS deployment
Mysql database - single table query (III)
NC basic usage 4
[numerical prediction case] (3) LSTM time series electricity quantity prediction, with tensorflow complete code attached
AQS learning
Remote code execution in Win 11 using wpad / PAC and JScript 3
An error is reported in the initialization metadata of the dolphin scheduler -- it turns out that there is a special symbol in the password. "$“
Computing the intersection of two planes in PCL point cloud processing (51)
SIGIR'22「微软」CTR估计:利用上下文信息促进特征表征学习
NC basic usage 3
R语言ggplot2可视化:ggplot2可视化散点图并使用geom_mark_ellipse函数在数据簇或数据分组的数据点周围添加椭圆进行注释
Unity general steps for creating a hyper realistic 3D scene
Record: call mapper to report null pointer Foreach > the usage of not removing repetition;
How to create bep-20 pass on BNB chain
山东大学软件学院项目实训-创新实训-网络安全靶场实验平台(八)
NC basic usage 2