-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: expected string or bytes-like object #144
base: main
Are you sure you want to change the base?
Conversation
when I try to run using style_mix like given example I got TypeError: expected string or bytes-like object . I print the input:s of num_range function. I find it may get a list and raise the error. I haven't found out when it happened (num_range function get a list),but simply change makes it work.
same here $ python style_mixing.py --outdir=out --rows=85,100,75,458,1500 --cols=55,821,1789,293 --network=https://nvlabs-fi-cdn.nvidia.com/stylegan2-ada-pytorch/pretrained/metfaces.pkl Traceback (most recent call last): File "style_mixing.py", line 116, in <module> generate_style_mix() # pylint: disable=no-value-for-parameter File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/core.py", line 1137, in __call__ return self.main(*args, **kwargs) File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/core.py", line 1061, in main with self.make_context(prog_name, args, **extra) as ctx: File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/core.py", line 923, in make_context self.parse_args(ctx, args) File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/core.py", line 1379, in parse_args value, args = param.handle_parse_result(ctx, opts, args) File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/core.py", line 2364, in handle_parse_result value = self.process_value(ctx, value) File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/core.py", line 2320, in process_value value = self.type_cast_value(ctx, value) File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/core.py", line 2307, in type_cast_value return convert(value) File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/types.py", line 75, in __call__ return self.convert(value, param, ctx) File "/home/ubuntu/anaconda3/envs/env_hung98_model/lib/python3.6/site-packages/click/types.py", line 170, in convert return self.func(value) File "style_mixing.py", line 29, in num_range m = range_re.match(s) TypeError: expected string or bytes-like object |
I have figured it out, rows has 1 extra number than cols, my fix is below: check out my kaggle code https://www.kaggle.com/rkuo2000/stylegan2-ada |
I met a problem when install: Installing collected packages: alphaction |
when I try to run using style_mix like given example I got
TypeError: expected string or bytes-like object .
I print the input:s of num_range function. I find it may get a list and raise the error.
I haven't found out when it happened (num_range function get a list),but simply change makes it work.