It is designed to work with ArcMap apparently. If you are using ArcGIS Pro, it won't work without recoding. Contact the authors and see if they have a version for ArcGIS Pro.
PS ArcMap 10.2 was a long time ago and is into the "mature" phase, meaning, nothing more will be done to support it
Thank you for the reply.
May I also know to what extend it need to be recoded? Is it possible to make it work by changing the import section only? And where could I find some tutorial?
Like mapping it should be changed to mp, does anyone have clue about 'Constants' and the remaining?
on top of that, python 2 vs python 3 changes may be involved.
Urban Network Analysis Toolbox for ArcGIS — City Form Lab .... there is a forum link... try there to see if an updated version is available