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

.py函数调用出错 #5

Closed
canvas-J opened this issue Jun 11, 2019 · 8 comments
Closed

.py函数调用出错 #5

canvas-J opened this issue Jun 11, 2019 · 8 comments

Comments

@canvas-J
Copy link

试运行,发现parser的characters_to_nodes函数无法调用到,也无法按照from xx import xx,抑或import xx.xx,删除该文件夹并另存__init__为.py仍旧没解决问题,不只是为何?

@canvas-J
Copy link
Author

报错信息如下:
File "c:\Users\xx\Documents\Repository\mathAI\系统代码(code)\welcome.py", line 41, in upload_file
result_file = solver.solve(save_file_path)
File "c:\Users\xx\Documents\Repository\mathAI\系统代码(code)\solver_init_.py", line 65, in solve
node_list = parser.characters_to_nodes(characters)
AttributeError: module 'parser' has no attribute 'characters_to_nodes'

@Roujack
Copy link
Owner

Roujack commented Jun 11, 2019

你好,据说是parser跟TensorFlow还是windows系统命名冲突了,请你修改本项目的parser命名,改成其它名字,然后调用到的地方也改成对应名字。

@xiaobaisheni
Copy link

xiaobaisheni commented Jun 11, 2019 via email

@canvas-J
Copy link
Author

谢谢,的确是这个问题

@DF-18
Copy link

DF-18 commented May 18, 2020

你好,据说是parser跟TensorFlow还是windows系统命名冲突了,请你修改本项目的parser命名,改成其它名字,然后调用到的地方也改成对应名字。

您好,我改了parser的名称(import parser as psr),引用parser的地方也都改成了psr,但运行还是报同样的错
报错如下:
Traceback (most recent call last):
File "E:/PY location/test.py", line 3, in
save_filename = solver.solve('./testImgs/easy +/3.jpg')
File "E:\PY location\solver_init_.py", line 65, in solve
node_list = psr.characters_to_nodes(characters)
AttributeError: module 'parser' has no attribute 'characters_to_nodes'

@Roujack
Copy link
Owner

Roujack commented May 18, 2020

你好,据说是parser跟TensorFlow还是windows系统命名冲突了,请你修改本项目的parser命名,改成其它名字,然后调用到的地方也改成对应名字。

您好,我改了parser的名称(import parser as psr),引用parser的地方也都改成了psr,但运行还是报同样的错
报错如下:
Traceback (most recent call last):
File "E:/PY location/test.py", line 3, in
save_filename = solver.solve('./testImgs/easy +/3.jpg')
File "E:\PY location\solver__init__.py", line 65, in solve
node_list = psr.characters_to_nodes(characters)
AttributeError: module 'parser' has no attribute 'characters_to_nodes'

我觉得应该修改parser的文件名为psr,然后import psr试试看?

@Roujack
Copy link
Owner

Roujack commented May 18, 2020

这个问题太多人遇到了,我试试把parser改掉看看吧。

@DF-18
Copy link

DF-18 commented May 18, 2020

这个问题太多人遇到了,我试试把parser改掉看看吧。

如果这样能解决问题那太好啦,辛苦您啦

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

4 participants