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

TypeError: can only concatenate str (not "bytes") to str #1694

Closed
jzahraoui opened this issue Jan 4, 2020 · 2 comments
Closed

TypeError: can only concatenate str (not "bytes") to str #1694

jzahraoui opened this issue Jan 4, 2020 · 2 comments

Comments

@jzahraoui
Copy link

jzahraoui commented Jan 4, 2020

Describe the bug
getting error with python 3.7 on debian sid.
the call to imdbid = find_imdbid(dir_name, input_name, omdbapikey) seems to pass input_name variable as byte intead of string.
working well with python 2.
tried to checkout nightly and getting the same error.

Technical Specs

  1. Running on Linux
  2. Python version 3.7.5

Log

[20:04:08] [INFO]::MAIN: Searching folder and file names for imdbID ...
Traceback (most recent call last):
  File "nzbToCouchPotato.py", line 272, in <module>
    result = nzbToMedia.main(sys.argv, section)
  File "/opt/nzbtomedia/nzbToMedia.py", line 1027, in main
    download_id=download_id or None, input_category=subsection)
  File "/opt/nzbtomedia/nzbToMedia.py", line 851, in process
    result = movies.process(section_name, input_directory, input_name, status, client_agent, download_id, input_category, failure_link)
  File "/opt/nzbtomedia/core/auto_process/movies.py", line 68, in process
    imdbid = find_imdbid(dir_name, input_name, omdbapikey)
  File "/opt/nzbtomedia/core/utils/identification.py", line 26, in find_imdbid
    m = re.search(r'\b(tt\d{7,8})\b', dir_name + input_name)
TypeError: can only concatenate str (not "bytes") to str
Exception ignored in: <function PosixProcess.__del__ at 0x7f5d9c459a70>
Traceback (most recent call last):
  File "/opt/nzbtomedia/core/utils/processes.py", line 95, in __del__
AttributeError: 'NoneType' object has no attribute 'isfile'

@clinton-hall
Copy link
Owner

I'm trying to figure out how this comes about... have you set the following?

[ASCII]
    convert = 1

I have made a slight change to the char replace. Are you able to update to latest nightly and test?

@jzahraoui
Copy link
Author

Hello,
the problem solved. great :)
thank you very much.
yes I'm using "convert = 1" option.

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

2 participants