Troubleshooting - bellevuewa/BKRCast GitHub Wiki

Here is list of some common problems faced by users:

Import Error: No module named inro.emme.desktop.app

An incomplete Python setup is often the cause of this error. See python setup instructions here.

Confirming the following should eliminate the import error:

  • Delete 'ply' folder under Anaconda Python install
  • Include inro.pth file under Anaconda Python install Anaconda2\Lib\site-packages
  • Confirm that Anaconda paths (c:\Anaconda2;c:\Ananconda2\Scripts;c:\Anaconda2\Library\bin) are at the beginning of PATH system variable string in Windows environment.
    path_edit.png

Debugging problem using Visual Studio 2017

When using Visual Studio 2017 as IDE to debug BKRCast code, you probably will get trapped in an unexpected exception, similar like this Debug_Error. If you run this code, you will never get any issue. But if you debug it, it will get trapped in the highlighted EMME API.

The solution is to disable Enable Just My Code in VS Debug setting. Solution_debug_error

Unexpected Error in Skims

If you receive unexpected error when running skimsandpaths.py, very likely some of your input files are either corrupted or incompatible with the input requirement.
SkimsAndPaths.py will reset a number of model elements before starting EMME auto and transit assignment. It will delete all existing matrices, create new matrices, load trip tables, populate introzonals, create transit fare matrices, initiate extra attributes (for assignment), and initiate functions.
Be aware that the EMME modeler tool for exporting functions does not produce a compatible output of functions for BKRCast. Inro has acknowledged the incompatibility and will work on a fix in the following updates. Meanwhile, use console mode to export functions instead, even though the PopulateNetwork.py does produce a set function files.

Unexpected Modeller Tool Missing Error

Occasionally, we may encounter an issue saying a certain EMME modeler tool or procedure is missing when importing network into data bank. Similar error message is below. Modeller_tool_missing

Possible fix 1:
This issue is caused by a version of gdal provided with Anaconda. The fix is to remove gdal from Anaconda.
conda remove gdal

After the removal, if you encounter another issue with geos, geos needs to be removed from Anaconda as well.
conda remove geos

Possible fix 2:
If the anaconda paths are missing from the system path environment variable, some packages will be found and loaded properly. Follow this link to add anaconda paths to path variable.

Unexpected error in daysim shadow pricing calculation

The crash could be similar like this screenshot.
shadow_pricing_error.png

If a worker cannot successfully find a job, the parcel ID of work place will be -1, and other attributes related to work will be -1 as well. As a result, daysim will crash.

Fix 1: make sure the network connectivity is OK, especially the connectivity to/from the TAZ where the home of the worker is located.
Fix 2: make sure the concerned TAZs in TAZindex.txt file are not set to 0 in dest_eligible field. TAZindex.txt should be located in inputs/model folder, or inputs/ if your BKRCast code hasnot been updated for long time.

Unexpected error in SkimsAndPaths.py

If the crash occurs at shadow pricing calculation, likely it is caused by data type/value issues inside synthetic population hh_and_person.h5 or parcels_urbansim.txt. Data values could be out of range. For example, hhtaz in hh_and_person.h5 could be negative number or missing value. Or data type could be questionable. For example, PSRC_ID in parcels_urbansim.txt` could be in float type (xxx.00000) instead of integer. For some unknown reason, it could cause unexpected crash.

If crash occurs during trip table or other data loading, likely it could be caused by TAZ problem. The first thing is to check TAZ number are within valid range.

No_Flow_Change error in SkimsAndPaths.py

If the crash occurs somewhere during EMME assignment (SkimsAndPaths.py), with the error message below, it is caused by internal data inconsistency in the supplemental submodel.
No_Flow_Change_error The solution is to turn on two switches in the configuration file input_configuration.py.
run_copy_seed_skims = True
run_copy_seed_supplemental_trips = True

Modeller (or logbook or Modeller shell) does not open

In EMME 4.6.0, after pointing the python environment to anaconda, modeller or logbook or modeller shell could not open under some circumstance. The file sip.pyd could cause conflict with EMME installation. Just delete this file from your anaconda environment to which EMME python environment is pointing. Possible location env\BKRCast\Lib\site-packages.

Daysim memory access error

If Daysim is crashed because of memory access error when reading synthetic population file, you could see the similar error message as below. daysim_memory_access_error You need to make sure the synthetic population is not in 64-bit. Daysim only reads 32-bit data from the synthetic population.

Daysim input string format error

If Daysim is crashed when validating input files, you could see the similar error message below. Be aware that this error message looks very similar to the error message above but they are different.
image You need to make sure the parcel file attributes have correct data type. For example, all jobs, households, and TAZ should be integers. After fix, rerun the accessibility.

Import error when running update_data.py

When running update_data.py (a script inside daysim_summaries), it is possible to encounter a 'dll load failed' error. image This is likely caused by pywin32 version conflict. The easy solution is run this script under EMME shell. You may need to install two python packages in EMME shell under admin right. To run shell under admin right, go to start, find Emme shell, right click and choose more | run as administrator. Then,
pip install openpyxl
pip install xlrd==1.2.0

Be sure to include version number when installing xlrd. Newer version of xlrd does not support Excel xlsx format.

Daysim error: object 'mfbkpt' doesn't exist

image

This error is caused by missing of matrix mf'bkpt'.
The general way to fix this error is to set run_skims_and_paths_seed_trips to True and rerun run_bkrcast.py. If you are confident the model structure remains unchange, run scripts/bikes/bike_model.py before run_bkrcast.py. The bike model will generate the missing matrix mf'bkpt'.

How to debug an EMME modeller tool

Follow this steps to debug an EMME modeller tool.
Step 1: image Step 2: image Step 3: image Step 4:
Open the tool you want to debug. Click the run button on VS IDE.
You may need to set break point in your VS IDE.