Troubleshooting - bellevuewa/BKRCast GitHub Wiki
Here is list of some common problems faced by users:
- Import Error: No module named inro.emme.desktop.app
- Debugging problem using Visual Studio 2017
- Unexpected Error in Skims
- Crash in shadow pricing calculation
- Unexpected Modeller Tool Missing Error
- Unexpected error in SkimsAndPaths.py
- No_Flow_Change error in SkimsAndPaths.py
- Modeller does not open
- Daysim memory access error
- Daysim input string format error
- Dll cannot be found when running update_data.py
- Daysim error object mf'bkpt' doesn't exist
- How to debug an EMME modeller tool
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 installAnaconda2\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.
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 . 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.
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.
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.
daysim
shadow pricing calculation
Unexpected error in The crash could be similar like this screenshot.
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.
SkimsAndPaths.py
Unexpected error in 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.
SkimsAndPaths.py
No_Flow_Change error in 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.
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.
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.
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.
update_data.py
Import error when running When running update_data.py
(a script inside daysim_summaries), it is possible to encounter a 'dll load failed' error.
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
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:
Step 2:
Step 3:
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.