TypeError: string indices must be integers
See original GitHub issueHi,
Iβm trying to run this on my Ubuntu server running Docker, so I created a container to run this script within.
Here is the setup Iβm using (linked)β¦
FROM ubuntu:latest
LABEL maintainer="KaHooli <kahooli@cavanaghs.id.au>"
LABEL description="Uses the script from https://github.com/haijeploeg/exclude_streaming_radarr to find movies on Radarr that are also on your subscribed streaming services. If they are, the script can work with Radarr to stop the movie from being downloaded again, and to remove the movie from storage."
RUN \
echo "**** install Python3, PIP and GIT packages ****" && \
apt-get update && \
apt-get install -y \
python3-pip \
git
RUN \
echo "**** Cloning script to /script ****" && \
git clone https://github.com/haijeploeg/exclude_streaming_radarr.git /script
WORKDIR /script
RUN \
echo "**** Installing Python packages required by the script ****" && \
pip3 install -r requirements.txt
CMD ["python3", "exclude_streaming_from_radarr.py"]
The docker-compose file I have specifies the setting asβ¦
radarr-exclude:
container_name: radarr-exclude
image: kahooli/exclude_streaming_radarr:ubuntu
networks:
- t2_proxy
depends_on:
- radarr
environment:
TMDB_API_KEY: "<removed for privacy>"
TMDB_LOCALE: "AU"
RADARR_URL: "https://radarr.$DOMAINNAME"
RADARR_API_KEY: "<removed for privacy>"
RADARR_EXCLUDE_PROVIDERS: "Netflix, Disney Plus, Apple TV Plus, BINGE, Stan"
But this is the output I am gettingβ¦
radarr-exclude | 2021-03-13T05:43:20.376417708Z Traceback (most recent call last):
radarr-exclude | 2021-03-13T05:43:20.376462120Z File "/script/exclude_streaming_from_radarr.py", line 36, in <module>
radarr-exclude | 2021-03-13T05:43:20.376475173Z providers = tmdb.movie.get_watch_providers(movie["tmdbId"])
radarr-exclude | 2021-03-13T05:43:20.376479305Z TypeError: string indices must be integers
radarr-exclude exited with code 1
Any ideas?
EDIT: changed container to be based on official Ubuntu container, adding Python3 PIP3 and Git, also added WORKDIR so PIP3 Install and script is run from the directory script is within. No change.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Why am I seeing "TypeError: string indices must be integers"?
The variable item is a string. An index looks like this: >>> mystring = 'helloworld' >>> print mystring[0] 'h'.
Read more >Typeerror: string indices must be integers β How to Fix in Python
This error happens when working with Python strings for two main reasons β using a string instead of an index number (integer) when...
Read more >Python typeerror: string indices must be integers Solution
String indices must be integers. This means that when you're accessing an iterable object like a string, you must do it using a...
Read more >TypeError: string indices must be integers
TypeError : string indices must be integers means an attempt to access a location within a string using an index that is not...
Read more >TypeError: string indices must be integers in Python | bobbyhadz
The Python "TypeError: string indices must be integers" occurs when we use a non-integer value to access a string at an index. To...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi Kahooli,
Thank you for your hard work on trying this to debug on your end! I will close this issue and answer your questions in the appropiate issues π Much appreciated π
Hi π
TL;DR
Iβve been waiting for something like this program for ages, as it should allow me to save quite a lot of hard drive space.
Here are some quick notes
Not Monitored
instead, and still have the files deleted from the drives.Not Monitored
and it is no longer listed on my streaming providers, it would be great to have the option to change the status back toMonitored
.Long story, incase it helps you with the development of this projectβ¦
Every time I ran the docker image I created, it would pull a fresh copy of your script. Now that youβve updated the repository, I couldnβt work out how to do what you asked.
I couldnβt see if youβve linked your repository to Docker Hub, so I forked it and did it myself for testing purposes at kahooli/excludarr. Iβm happy to remove this if you do create your own image on Docker Hub.
So, I created the file excludarr.ymlβ¦
And mapped the directory it is being stored into the docker image with the following CLI from my Ubuntu serverβ¦
I received this outputβ¦
It then stopped running the container.
So, I rand the same command again, but with the
delete
command added to the end, and got this outputβ¦Next, I ran it with both
--debug delete
commands added to the end of the command line, and got thisβ¦I can see on line 61 of the debug output that it does see my configuration fileβ¦
Next, instead of putting the external facing URL as I normally do with most programs, as the reverse proxy I have set up (Traefik v2) allows communication through without OAuth authentication when using the API key, I changed it to the internal network addressβ¦
and I got this output, to which I answered Noβ¦
Some progress, so next I allowed all providers in my listβ¦
And this is the output!
The odd thing is there is no movies listed with being with Netflix, even though I know I have some.
In the Radarr logs I can see thisβ¦
I know this is a super long post, but I hope this helps, and I look forward to your next updates.