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

python3.12 update needed #75

Open
graysky2 opened this issue Apr 27, 2024 · 7 comments
Open

python3.12 update needed #75

graysky2 opened this issue Apr 27, 2024 · 7 comments

Comments

@graysky2
Copy link
Contributor

graysky2 commented Apr 27, 2024

It seems that python3.12 breaks this script. Any change to update it?

% texturecache vclean
/usr/bin/texturecache:108: SyntaxWarning: invalid escape sequence '\.'
  serial_urls = "assets\.fanart\.tv"
/usr/bin/texturecache:359: SyntaxWarning: invalid escape sequence '\^'
  self.CACHE_IGNORE_TYPES[index] = re.compile(re.sub("^\^image://", "^", r.pattern))
/usr/bin/texturecache:361: SyntaxWarning: invalid escape sequence '\^'
  self.PRUNE_RETAIN_TYPES[index] = re.compile(re.sub("^\^image://", "^", r.pattern))
/usr/bin/texturecache:1286: SyntaxWarning: invalid escape sequence '\('
  title = re.sub("\(%d\)$" % year, "", title).strip()
/usr/bin/texturecache:2095: SyntaxWarning: invalid escape sequence '\.'
  self.web_re_result = re.compile("^.*:(%s)[ ]*: .*\.RECEIVED WEB DATA: ([0-9]*), (.*), (.*)$" % tpattern)
/usr/bin/texturecache:2096: SyntaxWarning: invalid escape sequence '\.'
  self.json_re_result = re.compile("^.*:(%s)[ ]*: .*\.PARSING JSON DATA: (.*)$" % tpattern)
/usr/bin/texturecache:3953: SyntaxWarning: invalid escape sequence '\.'
  RE_STACKING_1_9 = re.compile("(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[0-9]+)(.*?)(\.[^.]+)$", flags=re.IGNORECASE)
/usr/bin/texturecache:3954: SyntaxWarning: invalid escape sequence '\.'
  RE_STACKING_A_D = re.compile("(.*?)([ _.-]*(?:cd|dvd|p(?:ar)?t|dis[ck])[ _.-]*[a-d])(.*?)(\.[^.]+)$", flags=re.IGNORECASE)
/usr/bin/texturecache:4136: SyntaxWarning: invalid escape sequence '\?'
  RE_IMDB = re.compile("/movie/\?([0-9]*)")
/usr/bin/texturecache:5111: SyntaxWarning: invalid escape sequence '\.'
  episode = re.sub("([0-9]*x[0-9]*)\..*", "\\1", title)
/usr/bin/texturecache:5246: SyntaxWarning: invalid escape sequence '\.'
  episode = re.sub("([0-9]*x[0-9]*)\..*", "\\1", title)
/usr/bin/texturecache:5477: SyntaxWarning: invalid escape sequence '\.'
  episode = re.sub("([0-9]*x[0-9]*)\..*", "\\1", title)
/usr/bin/texturecache:5536: SyntaxWarning: invalid escape sequence '\.'
  episode = re.sub("([0-9]*x[0-9]*)\..*", "\\1", title)
/usr/bin/texturecache:5762: SyntaxWarning: invalid escape sequence '\.'
  episode_year = re.sub("([0-9]*x[0-9]*)\..*", "\\1", title)
/usr/bin/texturecache:5813: SyntaxWarning: invalid escape sequence '\.'
  episode_year = re.sub("([0-9]*x[0-9]*)\..*", "\\1", title)
/usr/bin/texturecache:5984: SyntaxWarning: invalid escape sequence '\.'
  SxE = re.sub("[0-9]*x([0-9]*)\..*", "\\1", episode["label"])
/usr/bin/texturecache:6038: SyntaxWarning: invalid escape sequence '\('
  re_parenthesis = re.compile("\([a-zA-Z]*\)$")
/usr/bin/texturecache:6098: SyntaxWarning: invalid escape sequence '\('
  tvshow["title"] = re.sub("\(%d\)$" % tvshow["tc.year"], "", tvshow["title"]).strip()
/usr/bin/texturecache:6793: SyntaxWarning: invalid escape sequence '\.'
  mediatype = re.sub(".*\.Get(.*)","\\1",r["method"])
/usr/bin/texturecache:7066: SyntaxWarning: invalid escape sequence '\.'
  mediatype = re.sub(".*\.Get(.*)","\\1",r["method"])
/usr/bin/texturecache:3942: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
  EPOCH = datetime.datetime.utcfromtimestamp(0)
Rescanning library...
@rainman74
Copy link

It seems that python3.12 breaks this script. Any change to update it?

No!

Just use this: https://forum.kodi.tv/showthread.php?tid=158373&pid=3184117#pid3184117

@graysky2
Copy link
Contributor Author

@rainman74 - I am on linux

@graysky2
Copy link
Contributor Author

I do not code in python but I can use chatgpt. This modification seems to fix the vclean and vscan functions but it breaks the P function with seems to go on forever. Someone with more knowledge needs to help...

graysky2@4a20676

@rainman74
Copy link

rainman74 commented Apr 28, 2024

@rainman74 - I am on linux

There are also Python wrappers for linux ;-)

Or you can use both versions at the same time, which is no problem at all with Linux.
https://askubuntu.com/questions/350751/install-and-run-python-3-at-the-same-time-than-python-2

@graysky2
Copy link
Contributor Author

I'd rather fix the code

@rainman74
Copy link

I'd rather fix the code

Good luck with your project then.

@Langelus
Copy link

Langelus commented May 4, 2024

Faced the same problem and while it would be lovely if the script got updated you could still possibly install Python 3.11 alongside the newer versions. I ran the script successfully on Ubuntu 24.04 with Deadsnakes build of Python 3.11

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11

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