当前位置:网站首页>[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 link database function of cadence OrCAD capture CIS replacement components, graphic tutorial and video demonstration
- nc基础用法3
- CVPR 2022 | querydet: use cascaded sparse query to accelerate small target detection under high resolution
- nc基础用法
- Introduction to electron Tutorial 4 - switching application topics
- Record: call mapper to report null pointer Foreach > the usage of not removing repetition;
- 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
- nc基础用法2
- Comment créer un pass BEP - 20 sur la chaîne BNB
- R language ggplot2 visual facet_wrap, and use the lineheight parameter to customize the height of the facet icon tab (gray label bar)
猜你喜欢
Unity general steps for creating a hyper realistic 3D scene
Grafana shares links with variable parameters
【webrtc】Add x264 encoder for CEF/Chromium
山东大学软件学院项目实训-创新实训-网络安全靶场实验平台(七)
[webrtc] add x264 encoder for CEF / Chromium
Building googlenet neural network based on pytorch for flower recognition
DTMF双音多频信号仿真演示系统
Comment créer un pass BEP - 20 sur la chaîne BNB
PCL点云处理之计算两平面交线(五十一)
Physical meaning of FFT: 1024 point FFT is 1024 real numbers. The actual input to FFT is 1024 complex numbers (imaginary part is 0), and the output is also 1024 complex numbers. The effective data is
随机推荐
【文本分类案例】(4) RNN、LSTM 电影评价倾向分类,附TensorFlow完整代码
Error reported by Azkaban: Azkaban jobExecutor. utils. process. ProcessFailureException: Process exited with code 127
使用 WPAD/PAC 和 JScript在win11中进行远程代码执行3
山东大学软件学院项目实训-创新实训-网络安全靶场实验平台(八)
Introduction to electron tutorial 3 - process communication
VeraCrypt文件硬盘加密使用教程
Mysql database - basic operation of database and table (II)
nc基础用法1
PCL点云处理之计算两平面交线(五十一)
Tencent Qiu Dongyang: techniques and ways of accelerating deep model reasoning
A simple (redisson based) distributed synchronization tool class encapsulation
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT
PCL点云处理之直线与平面的交点计算(五十三)
Possible root causes include a too low setting for -Xss and illegal cyclic inheritance dependencies
nc基础用法
Error reported by Azkaban: Azkaban jobExecutor. utils. process. ProcessFailureException: Process exited with code 64
R language uses timeroc package to calculate the multi time AUC value of survival data under competitive risk, uses Cox model and adds covariates, and R language uses the plotauccurve function of time
【数值预测案例】(3) LSTM 时间序列电量预测,附Tensorflow完整代码
【webrtc】Add x264 encoder for CEF/Chromium
Kubernetes introduction to mastery - ktconnect (full name: kubernetes toolkit connect) is a small tool based on kubernetes environment to improve the efficiency of local test joint debugging.