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

Strange tensor flow error due to an argument #11

alvaroromerosc opened this issue Mar 21, 2018 · 3 comments

Strange tensor flow error due to an argument #11

alvaroromerosc opened this issue Mar 21, 2018 · 3 comments


Copy link

@alvaroromerosc alvaroromerosc commented Mar 21, 2018


First of all, thank you for your effort with the open-source TTS projects.
As summary, I'm trying to create a TTS of Spanish language using your open-source dc_tts.

To do that, I want to train in my laptop the net that you uploaded as "pre-trained net" in order to know if I will be able to train my own network for spanish (once I have the spanish database correctly), but I get an error of tensorflow due to an argument. I have all the libraries correctly installed and the LJ database downloaded.

The only thing that I did was to download the repository, fix correctly the database paths (LJ) and run the train script with parameter "1".

C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\framework\] Invalid argument: TypeError: a bytes-like object is required, not 'str'

Thank you!

Copy link

@Sladix Sladix commented Mar 23, 2018

Hello, I'm encountering the same issue !

I'm on Windows 7 working with conda.
The synthetize script worked like a charm on the first try, but I'm still struggling with the same error as @alvaroromerosc .

Edit : Tried to add 'rb' as the's mode but it doesn't seems to solve anything...
Edit2 : It seems that the issue is caused because I try to run the script in python 3.6 and this seems to be causing the issue
Edit 3 : Since I'm using windows, I can't run tensorflow with python < 3.5 according to the official tensorflow documentation but I'll try to use conda to see if I manage to get this working. I'm super excited about training this model with various data !

Copy link

@Sladix Sladix commented Mar 28, 2018

A quick update,

I can't get tensorflow working on windows with python 27, @Kyubyong, could you point me in the right direction to update your code so it would be compatible with python 3.6 ?
Thanks a lot !

Copy link

@noetits noetits commented Jun 5, 2018


I had the same issue with linux in python 3.
In my case, it comes from (

Following your link that explain the issue, I searched how to convert bytes to string in python 3:

I replaced:
mel = "mels/{}".format(fname.replace("wav", "npy"))
mag = "mags/{}".format(fname.replace("wav", "npy"))


mel = "mels/{}".format(fname.decode("utf-8").replace("wav", "npy"))
mag = "mags/{}".format(fname.decode("utf-8").replace("wav", "npy"))

And it seems to work.
(Maybe it would be better to use try: ... except TypeError: ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants