ThePornDatabase / stash_theporndb_scraper

A python script to scrape Stash data from thePornDB
MIT License
68 stars 18 forks source link

TypeError: can only concatenate str (not "NoneType") to str #34

Open yast2 opened 2 years ago

yast2 commented 2 years ago

Hy, everytime i try to run the script I get the following error.

I'm on the development branch and the IP and port are correct.

INFO:root:API Key found for TPDB DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.22:9999 DEBUG:urllib3.connectionpool:http://192.168.0.22:9999 "GET /playground HTTP/1.1" 200 868 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.22:9999 DEBUG:urllib3.connectionpool:http://192.168.0.22:9999 "POST /graphql HTTP/1.1" 200 102 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.22:9999 DEBUG:urllib3.connectionpool:http://192.168.0.22:9999 "POST /graphql HTTP/1.1" 200 53 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.22:9999 DEBUG:urllib3.connectionpool:http://192.168.0.22:9999 "POST /graphql HTTP/1.1" 200 176 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.22:9999 DEBUG:urllib3.connectionpool:http://192.168.0.22:9999 "POST /graphql HTTP/1.1" 200 50 DEBUG:root:Getting tag id for tag 'ThePornDB Ambiguous'. DEBUG:root:Found the tag. ID is 3 DEBUG:root:Getting tag id for tag 'Scraped From ThePornDB'. DEBUG:root:Found the tag. ID is 4 DEBUG:root:Getting tag id for tag 'ThePornDB Unconfirmed Alias'. DEBUG:root:Found the tag. ID is 5 DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): 192.168.0.22:9999 DEBUG:urllib3.connectionpool:http://192.168.0.22:9999 "POST /graphql HTTP/1.1" 200 50 ERROR:root:Something went wrong. Have you: • Checked to make sure you're running the "development" branch of Stash, not "latest"? • Checked that you can connect to Stash at the same IP and port listed in your configuration.py? If you've check both of these, run the script again with the --debug flag. Then post the output of that in the Discord and hopefully someone can help.

Traceback (most recent call last): File "/mnt/user/torrent/test/scrapeScenes.py", line 1185, in main tag = my_stash.getTagByName(tag_name, False) File "/mnt/user/torrent/test/StashInterface.py", line 620, in getTagByName logging.debug("Getting tag id for tag \'"+name+"\'.") TypeError: can only concatenate str (not "NoneType") to str

Any advice? Thanks

yast2 commented 2 years ago

Turns out my API-Key was wrong.

However the new output still has the same error, eventhough it seems to work

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.metadataapi.net:443 DEBUG:urllib3.connectionpool:https://api.metadataapi.net:443 "GET /api/scenes?parse=missalikawhite_-_sniff_aroma_and_do_as_i_saybitch HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.metadataapi.net:443 DEBUG:urllib3.connectionpool:https://api.metadataapi.net:443 "GET /api/scenes?q=missalikawhite-_sniff_aroma_and_do_as_i_saybitch HTTP/1.1" 200 None ERROR:root:Exception encountered when scraping 'missalikawhite-_sniff_aroma_and_do_as_i_say_bitch Traceback (most recent call last): File "/mnt/user/torrent/test/scrapeScenes.py", line 460, in scrapeScene scene_data["tag_ids"].append(my_stash.getTagByName(config.unmatched_tag)['id']) File "/mnt/user/torrent/test/StashInterface.py", line 620, in getTagByName logging.debug("Getting tag id for tag \'"+name+"\'.") TypeError: can only concatenate str (not "NoneType") to str DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.metadataapi.net:443