mbafrani / AutomaticProcessSimulation

Automatic process simulation using Simpy and Pm4py.
Other
16 stars 5 forks source link

import factory #14

Open reza4153 opened 3 years ago

reza4153 commented 3 years ago

Hello,

when I run the simulation_activity.py, I get the error:

from pm4py.objects.log.importer.xes import factory as importer ImportError: cannot import name 'factory' from 'pm4py.objects.log.importer.xes' (C:\Users\Me\anaconda\lib\site-packages\pm4py\objects\log\importer\xes__init__.py).

How can I fix this issue?

Thanks!

Best Regards, Reza

mbafrani commented 3 years ago

Hello,

The code is based on pm4py 1.5.2.3, so if you use that specific version there should be no problem. However, we will update the code soon to be compatible with the latest version of the pm4py library.

Regards,

reza4153 commented 3 years ago

Hello,

Thanks for your feedback. I installed pm4py 1.5.2.3 and that error is fixed.

Now I get a new error:

File "simulation_activity.py", line 267, in create_methods() File "simulation_activity.py", line 172, in create_methods log = verify_extension_and_import() File "simulation_activity.py", line 109, in verify_extension_and_import log = import_xes(file_path) File "simulation_activity.py", line 62, in import_xes xes_log = xes_import_factory.apply(file_path) NameError: name 'xes_import_factory' is not defined

How can I fix this error?

Thanks in advance.

Best Regards, Reza

mbafrani commented 3 years ago

Hello,

These issues are caused by the incompatibility of the pm4py versions. We have upgraded pm4py to the latest version in the code and in the current version it only supports the .xes event log. We will update the csv files.

Regards, Mahsa