valkjsaaa / danmaku_tools

GNU General Public License v3.0
50 stars 11 forks source link

怎么使用?没有输出,告诉我如何debug #15

Open specked2527 opened 4 months ago

specked2527 commented 4 months ago
   danmaku_tools> python3 -m danmaku_tools.danmaku_energy_map 6.xml --graph 6.png 
   danmaku_tools> 

6.zip

Name: danmaku-tools
Version: 0.0.9
Summary: Process XML Danmaku File from BililiveRecorder
Home-page: https://github.com/valkjsaaa/danmaku_tools
Author: Jackie Yang
Author-email: jackie@jackieyang.me
License:
Location: c:\users\nas\appdata\local\programs\python\python38\lib\site-packages
Requires: matplotlib, numpy, python-dateutil, scipy, srt, textrank4zh, tqdm
Required-by:
Files:
  danmaku_tools-0.0.9.dist-info\INSTALLER
  danmaku_tools-0.0.9.dist-info\LICENSE
  danmaku_tools-0.0.9.dist-info\METADATA
  danmaku_tools-0.0.9.dist-info\RECORD
  danmaku_tools-0.0.9.dist-info\REQUESTED
  danmaku_tools-0.0.9.dist-info\WHEEL
  danmaku_tools-0.0.9.dist-info\top_level.txt
  danmaku_tools\__init__.py
  danmaku_tools\__pycache__\__init__.cpython-38.pyc
  danmaku_tools\__pycache__\analyze_danmaku.cpython-38.pyc
  danmaku_tools\__pycache__\clean_danmaku.cpython-38.pyc
  danmaku_tools\__pycache__\cut_danmaku.cpython-38.pyc
  danmaku_tools\__pycache__\danmaku_energy_map.cpython-38.pyc
  danmaku_tools\__pycache__\danmaku_tools.cpython-38.pyc
  danmaku_tools\__pycache__\he_video.cpython-38.pyc
  danmaku_tools\__pycache__\merge_danmaku.cpython-38.pyc
  danmaku_tools\analyze_danmaku.py
  danmaku_tools\clean_danmaku.py
  danmaku_tools\cut_danmaku.py
  danmaku_tools\danmaku_energy_map.py
  danmaku_tools\danmaku_tools.py
  danmaku_tools\he_video.py
  danmaku_tools\merge_danmaku.py 
specked2527 commented 4 months ago

debug

> python -m danmaku_tools.danmaku_energy_map 6.xml --graph 6.png
C:\Users\NAS\AppData\Local\Programs\Python\Python38\python.exe: Error while finding module specification for 'danmaku_tools.danmaku_energy_map' (ModuleNotFoundError: __path__ attribute not found on 'danmaku_tools' while trying to find 'danmaku_tools.danmaku_energy_map')

python -m pdb -m danmaku_tools.danmaku_energy_map 6.xml --graph 6.png

Traceback (most recent call last):
File "C:\Users\NAS\AppData\Local\Programs\Python\Python38\lib\pdb.py", line 1701, in main
pdb._runmodule(mainpyfile)
File "C:\Users\NAS\AppData\Local\Programs\Python\Python38\lib\pdb.py", line 1534, in _runmodule
mod_name, mod_spec, code = runpy._get_module_details(module_name)
File "C:\Users\NAS\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 135, in _get_module_details
raise error(msg.format(mod_name, type(ex).__name__, ex)) from ex
ImportError: Error while finding module specification for 'danmaku_tools.danmaku_energy_map' (ModuleNotFoundError: __path__ attribute not found on 'danmaku_tools' while trying to find 'danmaku_tools.danmaku_energy_map')
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
lengyanyu258 commented 4 months ago

可以参考这里的用法:

https://github.com/valkjsaaa/auto-bilibili-recorder/blob/1b190687e23408b270185dd66c72f0967517d77c/session.py#L168-L184