Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

源码运行错误 #4

Closed
kecrily opened this issue Nov 5, 2020 · 5 comments
Closed

源码运行错误 #4

kecrily opened this issue Nov 5, 2020 · 5 comments

Comments

@kecrily
Copy link

kecrily commented Nov 5, 2020

  • Windows 版本:Windows 10 专业工作站版(2004)x64
  • Python 版本:Python 3.9.0
  • requests 已安装,.config.cfg 已配置
PS C:\Users\Scvoet\Desktop\dev\Python\teelebot> python -m teelebot
Traceback (most recent call last):
  File "D:\Scoop\apps\python\current\lib\runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "D:\Scoop\apps\python\current\lib\runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "D:\Scoop\apps\python\current\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\__init__.py", line 13, in <module>
    bot = Bot()
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\teelebot.py", line 39, in __init__
    self.config = config()
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\handler.py", line 51, in config
    options = conf.options("config")
  File "D:\Scoop\apps\python\current\lib\configparser.py", line 675, in options
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'config'
Exception ignored in: <function Bot.__del__ at 0x000002B338B79040>
Traceback (most recent call last):
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\teelebot.py", line 70, in __del__
    self.__thread_pool.shutdown(wait=True)
AttributeError: 'Bot' object has no attribute '_Bot__thread_pool'
@plutobell
Copy link
Owner

* Python 版本:Python 3.9.0

* requests 已安装,.config.cfg 已配置
PS C:\Users\Scvoet\Desktop\dev\Python\teelebot> python -m teelebot
Traceback (most recent call last):
  File "D:\Scoop\apps\python\current\lib\runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "D:\Scoop\apps\python\current\lib\runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "D:\Scoop\apps\python\current\lib\runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\__init__.py", line 13, in <module>
    bot = Bot()
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\teelebot.py", line 39, in __init__
    self.config = config()
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\handler.py", line 51, in config
    options = conf.options("config")
  File "D:\Scoop\apps\python\current\lib\configparser.py", line 675, in options
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'config'
Exception ignored in: <function Bot.__del__ at 0x000002B338B79040>
Traceback (most recent call last):
  File "C:\Users\Scvoet\Desktop\dev\Python\teelebot\teelebot\teelebot.py", line 70, in __del__
    self.__thread_pool.shutdown(wait=True)
AttributeError: 'Bot' object has no attribute '_Bot__thread_pool'

请脱敏后贴上配置文件内容

@kecrily
Copy link
Author

kecrily commented Nov 5, 2020

@plutobell 如下

[config]
key=14***5655:AAG****ti9T_c7***kvnxxHc*****X3lnPA
pool_size=40 //the thread pool size, default 40, range(1, 101)
webhook=False
cert_pub=your public certificate dir //Optional while webhook is False
server_ip=your server ip address //Optional while webhook is False
server_port=your server port //Optional while webhook is False
local_address=webhook local address //Optional while webhook is False
local_port=webhook local port //Optional while webhook is False
root=1319085567
debug=False
timeout=60
plugin_dir=your plugin dir   //[Optional]

@plutobell
Copy link
Owner

@plutobell 如下

[config]
key=14***5655:AAG****ti9T_c7***kvnxxHc*****X3lnPA
pool_size=40 //the thread pool size, default 40, range(1, 101)
webhook=False
cert_pub=your public certificate dir //Optional while webhook is False
server_ip=your server ip address //Optional while webhook is False
server_port=your server port //Optional while webhook is False
local_address=webhook local address //Optional while webhook is False
local_port=webhook local port //Optional while webhook is False
root=1319085567
debug=False
timeout=60
plugin_dir=your plugin dir   //[Optional]
    在Windows环境下,默认配置文件路径为用户目录下的 .teelebot 文件夹,请检查该路径下是否具有正确的配置文件。
    若需要手动指定配置文件,请使用命令行参数 -c/--config

@kecrily
Copy link
Author

kecrily commented Nov 5, 2020

文件夹命名缺少了一个 e,感谢

@kecrily kecrily closed this as completed Nov 5, 2020
@plutobell
Copy link
Owner

文件夹命名缺少了一个 e,感谢

😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants