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

最新版paddle,python3兼容性问题 #16533

Closed
wsjz opened this issue Mar 29, 2019 · 5 comments
Closed

最新版paddle,python3兼容性问题 #16533

wsjz opened this issue Mar 29, 2019 · 5 comments

Comments

@wsjz
Copy link

wsjz commented Mar 29, 2019

最新版paddle

python3

报错信息
~\Develop\anaconda\lib\site-packages\paddle\utils\plot.py in append(self, title, step, value)
73 plot_curve.append(title="Curve 1",step=1,value=1)
74 """
---> 75 assert isinstance(title, basestring)
76 assert self.plot_data.has_key(title)
77 data = self.plot_data[title]

NameError: name 'basestring' is not defined

@wsjz
Copy link
Author

wsjz commented Mar 29, 2019

目前plot.py这个文件仍然是Python2的语法

比如python3没有的has_key:
'dict' object has no attribute 'has_key'

@luotao1
Copy link
Contributor

luotao1 commented Mar 29, 2019

您好,这个问题已经在develop版本中合入了,1.4正式版会解决这个问题,感谢您的建议!

@luotao1 luotao1 closed this as completed Mar 29, 2019
@wsjz
Copy link
Author

wsjz commented Mar 29, 2019

您好,这个问题已经在develop版本中合入了,1.4正式版会解决这个问题,感谢您的建议!

只是这个文件的问题吗。。。想求一份新的plot.py文件

@luotao1
Copy link
Contributor

luotao1 commented Mar 29, 2019

修复PR在#15906,从develop分支上下载plot.py就可以了。
https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/utils

@wsjz
Copy link
Author

wsjz commented Mar 29, 2019

修复PR在#15906,从develop分支上下载plot.py就可以了。
https://github.com/PaddlePaddle/Paddle/tree/develop/python/paddle/utils

解决了,谢谢

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