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

'WindowsFileLock' object has no attribute '_thread_lock' on first attempt. #534

Open
RGPZ opened this issue Feb 19, 2025 · 2 comments
Open

Comments

@RGPZ
Copy link

RGPZ commented Feb 19, 2025

First time ever trying to use the script, I tried running 'scdl -l https://soundcloud.com/antonykos/skeleton-song -a' but I get this error:

C:\Users\X\Music\Soundcloud Downloading>scdl -l https://soundcloud.com/antonykos/skeleton-song -a Exception ignored in: <function BaseFileLock.__del__ at 0x00000114BEDD36D0> Traceback (most recent call last): File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\filelock\_api.py", line 240, in __del__ self.release(force=True) File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\filelock\_api.py", line 201, in release with self._thread_lock: AttributeError: 'WindowsFileLock' object has no attribute '_thread_lock' Traceback (most recent call last): File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Users\X\AppData\Local\Programs\Python\Python310\Scripts\scdl.exe\__main__.py", line 7, in <module> sys.exit(main()) File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\scdl\scdl.py", line 325, in main config = get_config(config_file) File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\scdl\scdl.py", line 509, in get_config with get_filelock(config_file): File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\scdl\scdl.py", line 304, in get_filelock return SafeLock(lock_path, timeout=timeout) File "C:\Users\X\AppData\Local\Programs\Python\Python310\lib\site-packages\scdl\scdl.py", line 272, in __init__ self._lock = filelock.FileLock(lock_file, timeout, mode, thread_local) TypeError: BaseFileLock.__init__() takes from 2 to 3 positional arguments but 5 were given

Again this is the first time I've ever used this script, I installed it via pip so I'm not sure if that causes an issue rather than using pipx.

@7k50
Copy link

7k50 commented Feb 20, 2025

Similar situation here:

Exception ignored in: <function BaseFileLock.__del__ at 0x10387eef0>
Traceback (most recent call last):
  File "/Users/my_user/Python/copy310-misc/lib/python3.10/site-packages/filelock/_api.py", line 240, in __del__
    self.release(force=True)
  File "/Users/my_user/Python/copy310-misc/lib/python3.10/site-packages/filelock/_api.py", line 201, in release
    with self._thread_lock:
AttributeError: 'UnixFileLock' object has no attribute '_thread_lock'
Traceback (most recent call last):
  File "/Users/my_user/Python/copy310-misc/bin/scdl", line 8, in <module>
    sys.exit(main())
  File "/Users/my_user/Python/copy310-misc/lib/python3.10/site-packages/scdl/scdl.py", line 325, in main
    config = get_config(config_file)
  File "/Users/my_user/Python/copy310-misc/lib/python3.10/site-packages/scdl/scdl.py", line 509, in get_config
    with get_filelock(config_file):
  File "/Users/my_user/Python/copy310-misc/lib/python3.10/site-packages/scdl/scdl.py", line 304, in get_filelock
    return SafeLock(lock_path, timeout=timeout)
  File "/Users/my_user/Python/copy310-misc/lib/python3.10/site-packages/scdl/scdl.py", line 272, in __init__
    self._lock = filelock.FileLock(lock_file, timeout, mode, thread_local)
TypeError: BaseFileLock.__init__() takes from 2 to 3 positional arguments but 5 were given

Running in Python 3.10.4 on MacOS:

Name: scdl
Version: 2.12.3
Summary: Download Music from Souncloud
Home-page: https://github.com/flyingrub/scdl
Author: FlyinGrub
Author-email: flyinggrub@gmail.com
License: 
Location: /Users/niklas/Dropbox/Creative/Programming/Languages/Python/Virtual/copy310-misc/lib/python3.10/site-packages
Requires: docopt-ng, filelock, mutagen, pathvalidate, requests, soundcloud-v2, termcolor, tqdm, typing-extensions
Required-by: 

@7x11x13
Copy link
Member

7x11x13 commented Feb 20, 2025

Try updating scdl to v2.12.4

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

3 participants