After getting gprMax 3.1.7 to run successfully (on Windows), I attempted to try the devel branch (4.0.0b0) to use the Python API. However, I'm unable to get even the example antenna script to run correctly.
C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\python.exe C:\Users\GiladM\Downloads\antenna_wire_dipole_fs.py
Traceback (most recent call last):
File "C:\Users\GiladM\Downloads\antenna_wire_dipole_fs.py", line 69, in <module>
gprMax.run(scenes=[scene], n=1, outputfile=fn)
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\gprMax.py", line 159, in run
run_main(args)
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\gprMax.py", line 219, in run_main
results = context.run()
^^^^^^^^^^^^^
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\contexts.py", line 84, in run
model.build()
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\model_build_run.py", line 74, in build
self.reuse_geometry() if config.get_model_config().reuse_geometry else self.build_geometry()
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\model_build_run.py", line 142, in build_geometry
self.build_scene()
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\model_build_run.py", line 265, in build_scene
scene = parse_hash_commands(scene)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\hash_cmds_file.py", line 394, in parse_hash_commands
user_objs = get_user_objects(processedlines, checkessential=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\hash_cmds_file.py", line 349, in get_user_objects
parsed_commands = check_cmd_names(processedlines, checkessential=checkessential)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\GiladM\AppData\Local\anaconda3\envs\gprMax-devel\Lib\site-packages\gprmax-4.0.0b0-py3.12-win-amd64.egg\gprMax\hash_cmds_file.py", line 304, in check_cmd_names
raise SyntaxError
SyntaxError: None
=== Electromagnetic modelling software based on the Finite-Difference Time-Domain (FDTD) method
www.gprmax.com __ __
__ _ _ __ _ __| \/ | __ ___ __
/ _` | '_ \| '__| |\/| |/ _` \ \/ /
| (_| | |_) | | | | | | (_| |> <
\__, | .__/|_| |_| |_|\__,_/_/\_\
|___/|_|
v4.0.0b0 (Càrn Mòr)
Copyright (C) 2015-2024: The University of Edinburgh, United Kingdom
Authors: Craig Warren, Antonis Giannopoulos, and John Hartley
gprMax is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
gprMax is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
gprMax. If not, see
www.gnu.org/licenses.
[PC-NAME] | 0 x unknown (10 cores, 12 cores with Hyper-Threading) | 31.7 GiB | Windows 11 (64-bit)
|--->OpenMP: 10 threads
--- Model 1/1, input file: C:\Users\GiladM\Downloads\antenna_wire_dipole_fs.py
Constants/variables used/available for Python scripting: {c: 299792458.0, current_model_run: 1, e0: 8.8541878128e-12, inputfile: C:\Users\GiladM\Downloads\antenna_wire_dipole_fs.py, m0: 1.25663706212e-06, number_model_runs: 1, z0: 376.73031366686166}
Your input file contains an invalid command: # title
NoneType: None
Process finished with exit code 1
Has anyone encountered this before? I assume it's an issue with my installation process or Python environment, but no amount of uninstalling and reinstalling seems to affect it.