I'm trying to translate a column of Chinese addresses into English. I followed the documentation here: new column with coordinates using geopy pandas. It worked the first time (about 30 minutes ago). All of a sudden, when I re-ran it, it threw me an error. Doesn't matter I restart the kernel, it does not work now. Does anyone know what is going on? How do I solve this? Thanks in advance!
Sample df (edit request from Zaraki Kenpachi)
Full Chinese Address
湖北省荆州市洪湖市洪湖经济开发区万家墩大道1号
江西省九江市共青城工业新区
湖北孝感市孝南区毛陈镇孝武大道198号
Code
from googletrans import Translator
translator = Translator()
df['Translated English Address'] = df['Full Chinese Address'].apply(translator.translate, src='zh-CN', dest='en').apply(getattr, args=('text',))
# df= xin_loc.dropna(subset=['Translated English Address'])
df.head()
Error
JSONDecodeError: Expecting value: line 1 column 1 (char 0)