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

在Py3.6环境下移植出错 #57

Open
momo1986 opened this issue Sep 11, 2018 · 0 comments
Open

在Py3.6环境下移植出错 #57

momo1986 opened this issue Sep 11, 2018 · 0 comments

Comments

@momo1986
Copy link

尊敬的何君,您好,
感谢您的贡献。
我最近也在学习“深度学习的风格迁移”,但我在python3.6环境下运行您的文件,直接报了错误。

Reloaded modules: nets, nets.nets_factory, nets.alexnet, nets.cifarnet, nets.inception, nets.inception_resnet_v2, nets.inception_v1, nets.inception_utils, nets.inception_v2, nets.inception_v3, nets.inception_v4, nets.lenet, nets.overfeat, nets.resnet_v1, nets.resnet_utils, nets.resnet_v2, nets.vgg, preprocessing, preprocessing.preprocessing_factory, preprocessing.cifarnet_preprocessing, preprocessing.inception_preprocessing, preprocessing.lenet_preprocessing, preprocessing.vgg_preprocessing, reader, model, losses, utils
INFO:tensorflow:Scale of 0 disables regularizer.
INFO:tensorflow:Use pretrained model pretrained/vgg_16.ckpt
Traceback (most recent call last):

File "C:\Users\User\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2980, in run_code
self.showtraceback(running_compiled_code=True)

File "C:\Users\User\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 1868, in showtraceback
self._showtraceback(etype, value, stb)

File "C:\Users\User\Anaconda3\lib\site-packages\ipykernel\zmqshell.py", line 558, in _showtraceback
dh.parent_header, ident=topic)

File "C:\Users\User\Anaconda3\lib\site-packages\jupyter_client\session.py", line 737, in send
to_send = self.serialize(msg, ident)

File "C:\Users\User\Anaconda3\lib\site-packages\jupyter_client\session.py", line 625, in serialize
content = self.pack(content)

File "C:\Users\User\Anaconda3\lib\site-packages\jupyter_client\session.py", line 103, in
ensure_ascii=False, allow_nan=False,

File "C:\Users\User\Anaconda3\lib\site-packages\zmq\utils\jsonapi.py", line 43, in dumps
s = s.encode('utf8')

UnicodeEncodeError: 'utf-8' codec can't encode character '\udcd5' in position 2922: surrogates not allowed

这个错误未提示在哪段代码位置上,请问python环境变了之后,我做移植,要进行什么修改吗?比如配置文件要重新写?因为,一般python代码上随着新的语言特性不支持2.7版本,会准确提示错误的。打印的log并没有告诉我您的代码哪里与python3.6不兼容。

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

1 participant