-
Notifications
You must be signed in to change notification settings - Fork 831
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
AttributeError: 'NoneType' object has no attribute 'nodes' #54
Comments
I am running DeepWalk on Windows. I have the same issue as yours, I now have no solutions. |
Please try either of the following two options:
|
I am using Python 2, and future package is the latest. |
It doesn't throw errors when I run DeepWalk on Ubuntu. @GTmac |
I do not have a Windows machine at this moment. Can you check the version of packages which appear in https://github.com/phanein/deepwalk/blob/master/requirements.txt? Are they the same under Ubuntu and Windows on your machine? |
wheel and argparse are not the same, others are the same. |
I have changed the version of wheel and argparse packages and made their version be the same as Ubuntu's. But it still throws errors when running it on Windows. @GTmac |
I traced the error and it seems that in line 64 and 65 of module walks |
我认为,这是一个BUG,出现这个错误是因为变量并不能在多进程中共享,而且在程序中我并没有看到使用multiprocessing对变量__current_graph 进行多进程共享设置。我查看了python对多进程和多线程的支持,在老版本中两者的区分是混乱的。我使用的环境中最新的anacoda3 python3.6。 修改使用线程ThreadPoolExecutor,或是multiprocessing 设置进程共享变量,并没有出现任何错误。 当然对于python的多线程和多进程的效率我表示同情。@GTmac |
@asdfhalkehflkajdhf Nice insights! I will update the repo later to switch to multithreading. |
I met your problem too. Have you solved it? |
I met your problem too, could you tell me how to solve it?I'm going crazy! |
have you ever solve it? |
好久没有用过。
我记得不用手动更改,有一个环境配置文件,执行下就可以。
| |
liuzhuchen
|
|
liuzhuchen@126.com
|
签名由网易邮箱大师定制
On 3/25/2019 09:41,子辛<notifications@github.com> wrote:
我已经更改了wheel和argparse包的版本,并使它们的版本与Ubuntu相同。但是在Windows上运行它时仍然会抛出错误。@GTmac
have you ever solve it?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
你这不是安装成功了吗?
运行错误就自己debug查下吧,这种错误大概率每个人都不一样。
我没遇到数据大小限制,还有AttributeError: 'NoneType' object has no attribute 'nodes'
已经说的很明白了,没有"nodes"属性,查下为什么
| |
liuzhuchen
|
|
liuzhuchen@126.com
|
签名由网易邮箱大师定制
On 3/25/2019 10:11,子辛<notifications@github.com> wrote:
好久没有用过。 我记得不用手动更改,有一个环境配置文件,执行下就可以。 | | liuzhuchen | | liuzhuchen@126.com | 签名由网易邮箱大师定制 On 3/25/2019 09:41,子辛notifications@github.com wrote: 我已经更改了wheel和argparse包的版本,并使它们的版本与Ubuntu相同。但是在Windows上运行它时仍然会抛出错误。@GTmac have you ever solve it? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
首先感谢回复,万分感谢
您说的是那个文件鸭?是__main__.py还是setup.py文件,刚开始用的是py2,出现了这个问题,改成py3之后这个问题还存在。在安装deepwalk的时候执行了,“pip install -r requirement.txt”和"python setup.py install"将deepwalk安装成功了,之后input数据库的时候就出错了,在执行测试文件karate.adjlist时,没有出现任何错误完美运行。但是执行blogcatalog.mat文件之后就会出现AttributeError: 'NoneType' object has no attribute 'nodes'。会不会是因为数据太大,进入了else语句之后出现的错误,错误提示中有
Data size (walks*length): 32998400
Data size 32998400 is larger than limit (max-memory-data-size: 0). Dumping walks to disk.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
oh no,have you ever seen the problem.The problem i met just as same as the author's.I do't think it's an accident |
import logging logger = logging.getLogger("deepwalk") In the walk module of deepwalk, _current_graph and _vertex2str are both set to None as shown above. |
多进程不能共享变量,每个子进程里的 __current_graph 都是 None |
in walks.py from concurrent.futures import ThreadPoolExecutor as ProcessPoolExecutor problem solved! XD |
Hi, I also have a PC with Windows 10. Even if "futures" package is the lastest version, I am getting the same error. When I write: I get:
But I found something odd about this issue.
I get the below output and I think it is successfully completes:
I cannot solve the problem with upgrading packages. My installed list of packages with versions maybe useful with deepwalk:
Could you please help me about this issue? |
YES,it works,help other guys can see it |
good guy! |
When I set --max-memory-data-size 0, it throws following errors:
Number of nodes: 6301
Number of walks: 63010
Data size (walks*length): 2520400
Data size 2520400 is larger than limit (max-memory-data-size: 0). Dumping walks to disk.
Walking...
Traceback (most recent call last):
File "D:\Python27\Scripts\deepwalk-script.py", line 11, in
load_entry_point('deepwalk==1.0.1', 'console_scripts', 'deepwalk')()
File "D:\Python27\lib\site-packages\deepwalk-1.0.1-py2.7.egg\deepwalk_main_.py", line 162, in main
process(args)
File "D:\Python27\lib\site-packages\deepwalk-1.0.1-py2.7.egg\deepwalk_main_.py", line 83, in process
num_workers=args.workers)
File "D:\Python27\lib\site-packages\deepwalk-1.0.1-py2.7.egg\deepwalk\walks.py", line 85, in write_walks_to_disk
for file_ in executor.map(_write_walks_to_disk, args_list):
File "D:\Python27\lib\site-packages\concurrent\futures_base.py", line 641, in result_iterator
yield fs.pop().result()
File "D:\Python27\lib\site-packages\concurrent\futures_base.py", line 462, in result
return self.__get_result()
File "D:\Python27\lib\site-packages\concurrent\futures_base.py", line 414, in __get_result
raise exception_type, self._exception, self._traceback
AttributeError: 'NoneType' object has no attribute 'nodes'
Is there someone can help me?
The text was updated successfully, but these errors were encountered: