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

error running bvPlayer under windows 10 / python 3.11 #5

Open
reumle opened this issue Aug 25, 2024 · 0 comments
Open

error running bvPlayer under windows 10 / python 3.11 #5

reumle opened this issue Aug 25, 2024 · 0 comments

Comments

@reumle
Copy link

reumle commented Aug 25, 2024

Hello , thank you for your package!
Is it supposed to work under windows 10 / python 3.11 ? i have errors when displaying a short mp4 file (even though it (or part of it) plays on screen)

log session if it helps. The install of python 3.11 is fresh.

Thank you!

(.venv) C:\proj\PS1908\testvid.py\myproj>pip list
Package       Version
------------- ---------
bvPlayer      0.4.0
ffpyplayer    4.5.1
numpy         2.1.0
opencv-python 4.10.0.84
pillow        10.4.0
pip           24.2
setuptools    65.5.0

(.venv) C:\proj\PS1908\testvid.py\myproj>python
Python 3.11.9 (tags/v3.11.9:de54cf5, Apr  2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import bvPlayer
>>> import os
>>> os.listdir()
['juliaspinner.mp4']
>>> bvPlayer.bvPlayer("juliaspinner.mp4")
15.0
Exception in thread Thread-2 (writeFrames):
Traceback (most recent call last):
  File "D:\desktop\Python311\Lib\shutil.py", line 632, in _rmtree_unsafe
Exception in thread Thread-3 (writeFrames):
Traceback (most recent call last):
    os.unlink(fullname)
  File "D:\desktop\Python311\Lib\shutil.py", line 632, in _rmtree_unsafe
PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'C:\\Users\\elm\\AppData\\Local\\Temp\\tmp8u12xelc\\tmp0dhfz440.jpg'
    os.unlink(fullname)

PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'C:\\Users\\elm\\AppData\\Local\\Temp\\tmpts_1wqsm\\tmpq3puzuxx.jpg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\desktop\Python311\Lib\threading.py", line 1045, in _bootstrap_inner
During handling of the above exception, another exception occurred:
    self.run()
  File "D:\desktop\Python311\Lib\threading.py", line 982, in run

    self._target(*self._args, **self._kwargs)
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\VideoPlayer.py", line 203, in writeFrames
Traceback (most recent call last):
  File "D:\desktop\Python311\Lib\threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "D:\desktop\Python311\Lib\threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
    with self.make_temp_directory() as temp_dir:
  File "D:\desktop\Python311\Lib\contextlib.py", line 144, in __exit__
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\VideoPlayer.py", line 203, in writeFrames
    next(self.gen)
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\VideoPlayer.py", line 199, in make_temp_directory
    with self.make_temp_directory() as temp_dir:
  File "D:\desktop\Python311\Lib\contextlib.py", line 144, in __exit__
    temp_dir.cleanup()
  File "D:\desktop\Python311\Lib\tempfile.py", line 947, in cleanup
    next(self.gen)
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\VideoPlayer.py", line 199, in make_temp_directory
    self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
  File "D:\desktop\Python311\Lib\tempfile.py", line 929, in _rmtree
    temp_dir.cleanup()
    _shutil.rmtree(name, onerror=onerror)
  File "D:\desktop\Python311\Lib\shutil.py", line 787, in rmtree
  File "D:\desktop\Python311\Lib\tempfile.py", line 947, in cleanup
    return _rmtree_unsafe(path, onerror)
    self._rmtree(self.name, ignore_errors=self._ignore_cleanup_errors)
  File "D:\desktop\Python311\Lib\tempfile.py", line 929, in _rmtree
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\desktop\Python311\Lib\shutil.py", line 634, in _rmtree_unsafe
    _shutil.rmtree(name, onerror=onerror)
  File "D:\desktop\Python311\Lib\shutil.py", line 787, in rmtree
    onerror(os.unlink, fullname, sys.exc_info())
  File "D:\desktop\Python311\Lib\tempfile.py", line 893, in onerror
    return _rmtree_unsafe(path, onerror)
    _os.unlink(path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'C:\\Users\\elm\\AppData\\Local\\Temp\\tmpts_1wqsm\\tmpq3puzuxx.jpg'
  File "D:\desktop\Python311\Lib\shutil.py", line 634, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "D:\desktop\Python311\Lib\tempfile.py", line 893, in onerror
    _os.unlink(path)
PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'C:\\Users\\elm\\AppData\\Local\\Temp\\tmp8u12xelc\\tmp0dhfz440.jpg'
Traceback (most recent call last):
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\VideoPlayer.py", line 283, in playVideo
    load = Image.open(pop.name)
           ^^^^^^^^^^^^^^^^^^^^
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\PIL\Image.py", line 3431, in open
    fp = builtins.open(filename, "rb")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\elm\\AppData\\Local\\Temp\\tmpts_1wqsm\\tmpb3_lrxd7.jpg'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\bvPlayer.py", line 10, in __init__
    player.play()
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\VideoPlayer.py", line 83, in play
    self.playVideo()
  File "c:\proj\PS1908\testvid.py\.venv\Lib\site-packages\bvPlayer\VideoPlayer.py", line 285, in playVideo
    os.remove(pop.name)
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable: 'C:\\Users\\elm\\AppData\\Local\\Temp\\tmpts_1wqsm\\tmpb3_lrxd7.jpg'
>>>

(some windows(?) messages in french, like:
PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: --> file can not be accesses as it is used by another processs
and also
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable: --> ``file not found`

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

1 participant