RhinoRhys / radarr-collections

Movie discovery tool for Radarr to follow Movie Collections and People's work.
GNU General Public License v3.0
146 stars 10 forks source link

pathlib.Path.__enter__() is deprecated and scheduled for removal in Python 3.13 #133

Open dannyhand opened 1 year ago

dannyhand commented 1 year ago

Just set up this script and ran it for the first time. Excellent work!

I get this message upon running:

PS C:\Radarr\collector> python rcm.py ./config

C:\Radarr\collector\rcm.py:328: DeprecationWarning: pathlib.Path.enter() is deprecated and scheduled for removal in Python 3.13; Path objects as a context manager is a no-op with Path.joinpath(output_path, folder) as fold:

C:\Radarr\collector\rcm.py:358: DeprecationWarning: pathlib.Path.enter() is deprecated and scheduled for removal in Python 3.13; Path objects as a context manager is a no-op with Path.joinpath(config_path, u'memory.dat') as file:

My python info:

Python 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:38:34) [MSC v.1936 64 bit (AMD64)] on win32

mgaulton commented 5 months ago

I'm also experiencing this and my poking at it hasn't changed the erorr.

mgaulton commented 5 months ago

This got rid of the error, now i'm getting something else lol

Change this line

with pathlib.Path.joinpath(output_path, folder) as fold:

to this

fold = output_path.joinpath(folder)

Change this line

with pathlib.Path.joinpath(config_path, u'memory.dat') as file:

to this

file = config_path.joinpath(u'memory.dat') You'll need to unindent the code under this change.