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

播放时会出现一个时间转换错误 #936

Closed
Duelist-Fiora opened this issue Dec 6, 2021 · 1 comment · Fixed by #938
Closed

播放时会出现一个时间转换错误 #936

Duelist-Fiora opened this issue Dec 6, 2021 · 1 comment · Fixed by #938

Comments

@Duelist-Fiora
Copy link

Duelist-Fiora commented Dec 6, 2021

错误信息

➜  ~ musicbox
Traceback (most recent call last):
  File "/home/l/.local/lib/python3.9/site-packages/NEMbox/__main__.py", line 35, in start
    nembox_menu.start_fork(version)
  File "/home/l/.local/lib/python3.9/site-packages/NEMbox/menu.py", line 293, in start_fork
    Menu().start()
  File "/home/l/.local/lib/python3.9/site-packages/NEMbox/menu.py", line 974, in start
    self.build_menu_processbar()
  File "/home/l/.local/lib/python3.9/site-packages/NEMbox/menu.py", line 545, in build_menu_processbar
    self.ui.build_process_bar(
  File "/home/l/.local/lib/python3.9/site-packages/NEMbox/ui.py", line 320, in build_process_bar
    self.update_lyrics(now_playing, lyrics, tlyrics)
  File "/home/l/.local/lib/python3.9/site-packages/NEMbox/ui.py", line 224, in update_lyrics
    next_lyric_time = get_lyric_time(lyrics[self.now_lyric_index + 1])
  File "/home/l/.local/lib/python3.9/site-packages/NEMbox/ui.py", line 197, in get_lyric_time
    datetime.datetime.strptime(get_timestap(lyric_line), "%M:%S.%f")
  File "/usr/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/lib/python3.9/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '99:00.00' does not match format '%M:%S.%f'

软件信息

➜  ~ musicbox -v
NetEase-MusicBox installed version:0.3.1

➜  ~ python -V
Python 3.9.7

系统信息
manjaro , 5.15内核

hoyho added a commit to hoyho/musicbox that referenced this issue Jan 4, 2022
Time string from lyric_line is invalid in some case
For example, '99:00.00' which does not match format '%M:%S.%f'

fix darknessomi#936

Signed-off-by: hoyho <luohaihao@gmail.com>
kigawas pushed a commit that referenced this issue Jan 5, 2022
Time string from lyric_line is invalid in some case
For example, '99:00.00' which does not match format '%M:%S.%f'

fix #936

Signed-off-by: hoyho <luohaihao@gmail.com>
@rsp4jack
Copy link

rsp4jack commented Oct 1, 2022

仍未修复。
参见

datetime.datetime.strptime(get_timestap(lyric_line), "%M:%S.%f")

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

Successfully merging a pull request may close this issue.

2 participants