爬虫过程中遇到报错:ValueError: can only parse strings

源代码如下:
import requests
import json
from requests.exceptions import RequestException
import time
from lxml import etree

def get_one_page(url):
try:
headers = {
'User-Agent': 'Mozilla/5.0(Macintosh;Intel Mac OS X 10_13_3) AppleWebKit/537.36(KHTML,like Gecko) Chorme/65.0.3325.162 Safari/537.36'
}
response = requests.get(url,headers = headers)
if response.status_code == 200:
return response.text
return None
except RequestException:
return None

def parse_one_page(html):
html_coner = etree.HTML(html)
pattern = html_coner.xpath('//div[@id="container"]/div[@id="main"/div[@class = "ywnr_box"]//a/text()')
return pattern

def write_to_file(content):
with open('results.txt','a',encoding='utf-8') as f:
f.write(json.dumps(content,ensure_ascii=False)+'\n')

def main(offset):
url = 'http://www.cdpf.org.cn/yw/index_'+str(offset)+'.shtml'
html = get_one_page(url)
for item in parse_one_page(html):
print(item)
write_to_file(item)

if name == '__main__':
for i in range(6):
main(offset=i*10)
time.sleep(1)
请问各位大佬到底是哪里出了错??

python代码依赖缩进,你贴出来的连缩进都没有。
python给出的错误信息,同时会给出你错误的行号甚至行的内容,你也不给。
自己仔细检查下吧,有一个地方要你给字符串,你给的变量不是字符串