linzhp / Codevo3

Software evolution simulation
2 stars 1 forks source link

codevo crashes #10

Closed ph-preux closed 7 years ago

ph-preux commented 7 years ago

Hi,

I've downloaded the package and followed the instructions. Now, I have 2 issues, one is a warning, the other one is a crash. The warning messages: WARNING: Couldn't write lextab module 'lextab'. [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/plyj/lextab.py WARNING: Couldn't create 'parsetab'. [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/plyj/parsetab.py' No surprise that codevo is not allowed to write in this protected fs.

The crash: I copy/paste the whole series of messages:

/full-pathname-to/Codevo3/codevo/utils.py:10: VisibleDeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future return weighted_values[selected_index][0] Traceback (most recent call last): File "/full-pathname-to/Codevo3/codevo/team.py", line 69, in work change_size += self._codebase.add_method_call(method_name, callee_name) File "/full-pathname-to/Codevo3/codevo/codebase.py", line 182, in add_method_call caller.body.append(ExpressionStatement(ref)) NameError: name 'ExpressionStatement' is not defined

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "codevo/simulate.py", line 34, in env.run(until=options.time) File "/usr/lib/python3/dist-packages/simpy/core.py", line 137, in run self.step() File "/usr/lib/python3/dist-packages/simpy/core.py", line 229, in step raise exc NameError: name 'ExpressionStatement' is not defined

Thanks for any help,

linzhp commented 7 years ago

Pushed a fix. It was a result of newer version of numpy. Also you should put plyj in a writable directory and set PYTHONPATH to it. I also updated README to specify that. Let me know if you run into more troubles

ph-preux commented 7 years ago

Thanks, I understand what you say. However, as I install plyj with "sudo pip3 install plyj", plyj gets installed to that /usr/... directory which is not writable. So I have to hand-install plyj as you mention it in you readme "git clone...." and give up on pip (or is these an option to pip to make the directory writable?).

ph-preux commented 7 years ago

BTW, regarding your readme, instead of "env PYTHONPATH=. python3 codevo/simulate.py 200000" one should do "python3 codevo/simulate.py 200000"

With that, copy/pasting your readme works like a charm (for me).

linzhp commented 7 years ago

Updated. Thanks