错误信息:
Traceback (most recent call last):
File "/data/app/ald_spark/aldstat_daily.py", line 177, in <module>
calc_convert_rate3(spark)
File "/data/app/ald_spark/aldstat_daily.py", line 77, in calc_convert_rate3
event_logs_df.show();
File "/data/app/ald_spark/spark/python/lib/pyspark.zip/pyspark/sql/dataframe.py", line 287, in show
UnicodeEncodeError: 'ascii' codec can't encode characters in position 822-825: ordinal not in range(128)
解决方法,提交脚本之前,设置环境变量:
export PYTHONIOENCODING=utf8
网友评论