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

Crash on Python3.8+ due to time.clock() in render_strategy/ascii_strategy.py #77

Open
dreamhunter2333 opened this issue Jan 7, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@dreamhunter2333
Copy link

dreamhunter2333 commented Jan 7, 2022

Describe the bug
Crash on Python3.8+ due to time.clock() in render_strategy/ascii_strategy.py

on Python3.8+ time.clock() should be replaced bytime.perf_counter() or otherelse
stackoverflow link about that

To Reproduce
Steps to reproduce the behavior:

  1. install python3.9.9
  2. install video-to-ascii
  3. run video-to-ascii
  4. and you will get an error bellow
Traceback (most recent call last):
  File "/Users/xxx/Downloads/AE/./venv/bin/video-to-ascii", line 8, in <module>
    sys.exit(main())
  File "/Users/xxx/Downloads/AE/venv/lib/python3.9/site-packages/video_to_ascii/cli.py", line 21, in main
    player.play(ARGS.file, strategy=ARGS.strategy, output=ARGS.output, play_audio=ARGS.with_audio)
  File "/Users/xxx/Downloads/AE/venv/lib/python3.9/site-packages/video_to_ascii/player.py", line 23, in play
    engine.play(output)
  File "/Users/xxx/Downloads/AE/venv/lib/python3.9/site-packages/video_to_ascii/video_engine.py", line 36, in play
    self.render_strategy.render(self.read_buffer, 
  File "/Users/xxx/Downloads/AE/venv/lib/python3.9/site-packages/video_to_ascii/render_strategy/ascii_strategy.py", line 120, in render
    t0 = time.clock()
AttributeError: module 'time' has no attribute 'clock'

Expected behavior
Hope support python3.9.9

Desktop (please complete the following information):

  • OS: [Macos]
  • Version [12.1]
@joelibaceta joelibaceta added the bug Something isn't working label Feb 1, 2022
@joelibaceta joelibaceta self-assigned this Feb 7, 2022
@Solider1337
Copy link

same problem /windows 11, python 3.9

@theamircodex
Copy link

same problem win 10 python 3.8

@joelibaceta
Copy link
Owner

Yup, I'm still dealing with windows compatibility

@steb-git
Copy link

same problem here, but i was using Ubuntu 22.04 LTS when that happened 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants