Closed MarkoRimac closed 4 years ago
Hello Marko, Can you provide more detailed information about the error? Thanks
Ok, here it is:
Traceback (most recent call last): File "C:\Python27\lib\site-packages\yafs\core.py", line 383, in add_source_population self.send_message(name_app, msg, idDES, self.SOURCE_METRIC) File "C:\Python27\lib\site-packages\yafs\core.py", line 183, in __send_message paths,DES_dst = self.selector_path[app_name].get_path(self,app_name, message, self.alloc_DES[idDES], self.alloc_DES, self.alloc_module, self.last_busy_time) TypeError: get_path() takes exactly 9 arguments (8 given)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:/Users/Marko/Desktop/YAFS/src/examples/Tutorial/main1.py", line 155, in
Process finished with exit code 1
Same error occurs in every YAFS/src/examples program I try to run.
I have been reviewing the repository code but I have not found anything abnormal.
The main1.py needs the selectorPath defined in the file simpleSelection.py.
In that file, the function signature is:
def get_path(self, sim, app_name, message, topology_src,alloc_DES, alloc_module,traffic,from_des):
with 8 parameters.
This function is called by the core.py file in 204 line:
paths,DES_dst = self.selector_path[app_name].get_path(self,app_name, message, self.alloc_DES[idDES], self.alloc_DES, self.alloc_module, self.last_busy_time,from_des=idDES)
with 8 parameters: self 1, app_name 2, message 3, self.alloc_DES[idDES] 4, self.alloc_DES 5, self.alloc_module 6, self.last_busy_time 7 ,from_des=idDES 8.
The code in the git is right.
Maybe you are using another core.py file. Have you installed YAFS using pip? The pip version isn't longer maintained. Or maybe, you have an incorrect path... Could you check & compare the line 204 of your core.py file? In order to check if this file is used, try to modify the function signature, for example, adding two or more arguments inline 204.
Hello, I've seen issue #14 being fixed and closed, but I'm getting the exact same error with the latest clone.