Error in converting to LMDB format for S2EF dataset

When I want to download the S2EF dataset with the code:
“python scripts/ --task s2ef --split 200k --get-edges --ref-energy”

The “s2ef_train_200K.tar” file was downloaded and uncompressed successfully.
However, an error occurred during the preprocessing of the data into LMDBs, which is as follows:

Preprocessing data into LMDBs: 0%| | 0/200000 [00:03<?, ?it/s]
Traceback (most recent call last):
File “/home/mohsen1/miniconda3/envs/fair-chem/lib/python3.11/multiprocessing/”, line 125, in worker
result = (True, func(*args, **kwds))
File “/home/mohsen1/fairchem/src/fairchem/core/scripts/”, line 57, in write_images_to_lmdb
data_object.y -= ref_energy
TypeError: unsupported operand type(s) for -=: ‘NoneType’ and ‘float’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/home/mohsen1/fairchem/src/fairchem/core/scripts/”, line 177, in
File “/home/mohsen1/fairchem/src/fairchem/core/scripts/”, line 86, in get_data
preprocess_data(uncompressed_dir, output_path)
File “/home/mohsen1/fairchem/src/fairchem/core/scripts/”, line 116, in preprocess_data
File “/home/mohsen1/fairchem/src/fairchem/core/scripts/”, line 126, in main
op = list(zip(*pool.imap(write_images_to_lmdb, mp_args)))
File “/home/mohsen1/miniconda3/envs/fair-chem/lib/python3.11/multiprocessing/”, line 873, in next
raise value
TypeError: unsupported operand type(s) for -=: ‘NoneType’ and ‘float’

Could you please check this problem.
Best regards

Hi -

Thanks for flagging this. This indeed is an issue on our end with the recent code updates. I have pushed a fix: update preprocess script by mshuaibii · Pull Request #726 · FAIR-Chem/fairchem · GitHub. Once that merges give this another try.

Sorry about that!