# I want to ask how to solve this error when I run "cgenff\_charmm2gmx. py"

**URL:** <https://gromacs.bioexcel.eu/t/i-want-to-ask-how-to-solve-this-error-when-i-run-cgenff-charmm2gmx-py/4986>\
**Category:** User discussions\
**Tags:** analysis-tools\
**Created:** [October 10, 2022, 12:54pm UTC](https://gromacs.bioexcel.eu/t/i-want-to-ask-how-to-solve-this-error-when-i-run-cgenff-charmm2gmx-py/4986 "2022-10-10T12:54:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Demyan](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@Demyan](https://gromacs.bioexcel.eu/u/Demyan)\
**Post date:** [October 10, 2022, 12:54pm UTC](https://gromacs.bioexcel.eu/t/i-want-to-ask-how-to-solve-this-error-when-i-run-cgenff-charmm2gmx-py/4986/1 "2022-10-10T12:54:25Z")

</div>

I want to ask how to solve this error when I run “cgenff\_charmm2gmx. py”

E:\1AKI\>python cgenff\_charmm2gmx.py JZ4 jz4\_fix.mol2 jz4.str charmm36-mar2019.ff  
NOTE 1: Code tested with Python 3.5.2 and 3.7.3. Your version: 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]

NOTE 2: Code tested with NetworkX 2.3. Your version: 2.3

NOTE 3: Please be sure to use the same version of CGenFF in your simulations that was used during parameter generation:  
–Version of CGenFF detected in jz4.str : 4.6  
–Version of CGenFF detected in charmm36-mar2019.ff/forcefield.doc : 4.6

NOTE 4: To avoid duplicated parameters, do NOT select the ‘Include parameters that are already in CGenFF’ option when uploading a molecule into CGenFF.  
Traceback (most recent call last):  
File “cgenff\_charmm2gmx.py”, line 1035, in   
anglpars = read\_gmx\_anglpars(filename)  
File “cgenff\_charmm2gmx.py”, line 153, in read\_gmx\_anglpars  
for line in f.readlines():  
UnicodeDecodeError: ‘gbk’ codec can’t decode byte 0x92 in position 7565: illegal multibyte sequence

---

<div class="post-metadata">

**Author:** ![deepakshilkar](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/deepakshilkar/32/2612_2.png) [@deepakshilkar](https://gromacs.bioexcel.eu/u/deepakshilkar)\
**Post date:** [November 7, 2023, 10:30am UTC](https://gromacs.bioexcel.eu/t/i-want-to-ask-how-to-solve-this-error-when-i-run-cgenff-charmm2gmx-py/4986/2 "2023-11-07T10:30:54Z")

</div>

It’s late, but I’m adding it for posterity. It’s essential to verify that you are using the correct versions of Python and NetworkX, as stated in the script’s notes. The error you’re encountering is not directly related to the CGenFF package but rather to how the script reads and handles files.
