Snappy-conf snappyutil.py error: jvm_max_mem undefined

I’m attempting to install and configure snap-python in a reusable deployment script on a centos 6 node. I use pip to install and wheel jpy successfully from the latest git repository. A problem arises when snappy-conf runs snaputil.py and attemtps to write the snappy.ini file. The error is:

INFO: Configuring snappy...
ERROR: Configuration failed
Traceback (most recent call last):
  File "./snappyutil.py", line 262, in _main
    force=args.force)
  File "./snappyutil.py", line 195, in _configure_snappy
    'java_max_mem: %s\n' % jvm_max_mem,
NameError: name 'jvm_max_mem' is not defined

I’ve searched snappyutil.py and jvm_max_mem is not defined anywhere. In jpy the config file writes a property jvm_maxmem = None. The spelling is different.

Is this a version-dependency issue? The script I am writing is below:

#!/usr/bin/env bash

export SNAPPY_HOME_DIR=~/.snap/snap-python/snappy/
export JDK_HOME=/apps/java/jdk1.8.0_60/
export JAVA_HOME=/apps/java/jdk1.8.0_60/
# For instructions on installing apache-maven if necessary, see here: https://maven.apache.org/install.html
export PATH="/g/data/dg9/applications/apache-maven-3.5.2/bin:$PATH"
export JAVA_OPTS="-Xss10m -Xms512m -Xmx66560m"
export JPY_JVM_MAXMEM="64G"
export JPY_PY_CONFIG=`pwd`/jpyconfig.py

# clean up old install of jpy
rm -r $SNAPPY_HOME_DIR/jpy*
rm $SNAPPY_HOME_DIR/jdl*

module unload java
module load java/jdk1.8.0_60
module unload python
module unload python3
module load python3/3.6.2

pip3 wheel git+https://github.com/bcdev/jpy
module load esa-snappy

mv ./*.whl $SNAPPY_HOME_DIR
snappy-conf /apps/python3/3.6.2/bin/python3.6

I also hit this error, and suspected an outdated snappyutil.py so I googled snappyutil.py and found snappyutil.py with jvm-max-mem.
This version has:

 $ grep 'jvm_max_mem' ~/.snap/snap-python/snappy/snappyutil.py
                  jvm_max_mem=None,
 :param jvm_max_mem: The heap size of the JVM.
                         'java_max_mem: %s\n' % jvm_max_mem,
 parser.add_argument('--jvm_max_mem', default='3G', help='size of the Java VM heap space')
                                 jvm_max_mem=args.jvm_max_mem,

I wonder if installing some update when you have an existing ~/.snap/snap-python/snappy directory leaves you with the old version of snappyutil.py.

Ditto, just got this same error while executing snappy-conf

Yes, you are right George.
When updating the SNAP especially the snap-python module, then snappy needs to be configured again.

We have several ideas how to make the entire snappy/python thing easier for you guys. Unfortunately, we do not have as much time as we have ideas.

A common problem for developers of popular open source software. In many cases a complete solution is overkill – just a reminder that snappy may need updating should poiint users in the right direction.