如何解决Telethon:使用 Python 和 Telethon 抓取 Telegram 组成员
我正在尝试在此网站上运行此代码,但出现此错误 https://python.gotrained.com/scraping-telegram-group-members-python-telethon/
任何人都知道我做错了什么
OperationalError Traceback (most recent call last)
<ipython-input-2-6ad2f1d4b165> in <module>
10 api_hash = 'xxxxxxxxxxxxxxxxxxxxxxx'
11 phone = '+xxxxxxxxxxxx'
---> 12 client = TelegramClient(phone,api_id,api_hash)
13
14 client.connect()
~\anaconda3\lib\site-packages\telethon\client\telegrambaseclient.py in __init__(self,session,api_hash,connection,use_ipv6,proxy,local_addr,timeout,request_retries,connection_retries,retry_delay,auto_reconnect,sequential_updates,flood_sleep_threshold,raise_last_call_error,device_model,system_version,app_version,lang_code,system_lang_code,loop,base_logger)
282 DEFAULT_DC_ID,283 DEFAULT_IPV6_IP if self._use_ipv6 else DEFAULT_IPV4_IP,--> 284 DEFAULT_PORT
285 )
286
~\anaconda3\lib\site-packages\telethon\sessions\sqlite.py in set_dc(self,dc_id,server_address,port)
166 def set_dc(self,port):
167 super().set_dc(dc_id,port)
--> 168 self._update_session_table()
169
170 # Fetch the auth_key corresponding to this data center
~\anaconda3\lib\site-packages\telethon\sessions\sqlite.py in _update_session_table(self)
192 # some more work before being able to save auth_key's for
193 # multiple DCs. Probably done differently.
--> 194 c.execute('delete from sessions')
195 c.execute('insert or replace into sessions values (?,?,?)',(
196 self._dc_id,OperationalError: database is locked
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。