Replies: 1 comment 2 replies
-
@Nickonian Did you use |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Paul,
I'm having an issue with the run calls in my python code. My script is a basic GUI to scan for file duplicates and perform actions on the results. I have a tkVideoPlayer widget in my GUI, which automatically plays a video if a file is selected from a list. The videos play ok, but when switching to a new file I eventually get this exception:
Exception in thread Thread-5 (_load):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home//PycharmProjects/pythonProject2/.venv/lib/python3.10/site-packages/tkVideoPlayer/tkvideoplayer.py", line 206, in _load
self._container.close()
AttributeError: 'NoneType' object has no attribute 'close'
I've traced it through the tkVideoPlayer.py and threading.py to an issue with run calls and the "self._container" value, which occasionally returns as None - here's a debug print I added to your code to show the value of the container.
container: <av.InputContainer '/home//Downloads/AATEST/SampleVideo_1280x720_5mb.mkv'>
container: <av.InputContainer '/home//Downloads/AATEST/SampleVideo_1280x720_5mb(1).mkv'>
container: None
(often followed by PDB hang or exception)
I initially thought the issue may be due to libavcodec issues, but the exception can occur between duplicate files of the same size and codec. The starting point for my debug is obviously my code and the logic of the functions/threads, but I am still in the "learning" phase so my understanding of threading is limited. I'm using Pycharm 3.4 on Ubuntu 22.04.4
Any pointers would be most appreciated!
Cheers, Nick
Beta Was this translation helpful? Give feedback.
All reactions