Error: ‘int’ object has no attribute ‘upper’

Error: ‘int’ object has no attribute ‘upper’
File “C:\Users\marqu.conda\envs\mfix-22.4.3\Scripts\mfix-script.py”, line 9, in
sys.exit(main())
File “C:\Users\marqu.conda\envs\mfix-22.4.3\lib\site-packages\mfixgui\gui.py”, line 3689, in main
main_args(sys.argv[1:])
File “C:\Users\marqu.conda\envs\mfix-22.4.3\lib\site-packages\mfixgui\gui.py”, line 3889, in main_args
gui.open_project(project_file, interactive=(not args.test))
File “C:\Users\marqu.conda\envs\mfix-22.4.3\lib\site-packages\mfixgui\gui.py”, line 2963, in open_project
self.post_open(project_file, pidfile)
File “C:\Users\marqu.conda\envs\mfix-22.4.3\lib\site-packages\mfixgui\gui.py”, line 3172, in post_open
self.vtkwidget.geometry_from_str(geo)
File “C:\Users\marqu.conda\envs\mfix-22.4.3\lib\site-packages\mfixgui\vtk_widgets\modeler.py”, line 615, in geometry_from_str
b_name = self.get_boundary_name()
File “C:\Users\marqu.conda\envs\mfix-22.4.3\lib\site-packages\mfixgui\vtk_widgets\modeler.py”, line 741, in get_boundary_name
fname = os.path.join(prj_dir, run_name.upper()+“_boundary.vtk”)
Save diagnostic report?

Hi @ulag1

Somehow the run name is being treated as a number rather than a string. What do you have “Run Name” set to? When reporting bugs it is helpful to include your project files. It’s also helpful to make the post topic more specific.

You are running an older version of MFiX (22.4.3), the current version is 24.1.1 It’s possible that this bug has been fixed since 2022. You can try upgrading to the current version.

– Charles

Error: ‘int’ object has no attribute ‘upper’
File “C:\Users\marqu\miniforge3\envs\mfix-24.1.1\Scripts\mfix-script.py”, line 9, in
sys.exit(main())
^^^^^^
File “…\main.py”, line 23, in main
main_args(sys.argv[1:])
File “…\main.py”, line 233, in main_args
gui.open_project(project_file, interactive=(not args.test))
File “…\gui.py”, line 3122, in open_project
self.post_open(project_file, pidfile)
File “…\gui.py”, line 3333, in post_open
self.vtkwidget.geometry_from_str(geo)
File “…\vtk_widgets\modeler.py”, line 815, in geometry_from_str
b_name = self.get_boundary_name()
^^^^^^^^^^^^^^^^^^^^^^^^
File “…\vtk_widgets\modeler.py”, line 941, in get_boundary_name
fname = os.path.join(prj_dir, run_name.upper()+“_boundary.vtk”)

I tried to install mfix version but i have this message
Where i can see the parameter “Run Name”

Run name is set in the Run Control panel.

It looks like your run name is being interpreted as a number not a string. A run name like 1 should be OK but perhaps you found a bug in the code. You could try changing the run name to something that doesn’t look like a number.

Also, when looking for help, it’s useful to attach your project files so we can try to replicate the error. A good way to do this is to go to the main MFiX menu and click “Submit bug report”, this will create a ZIP file that you can upload here.

shot-2024-06-11_09-50-30

– Charles

thank you for your helps. But i cannot enter in the software this error block me
i cannot send what do you want because i have not access
when i strat the software with miniforge prompt i have this message error

The error message indicates that the problem occurs in the main_args(sys.argv[1:]) function call inside your main() function. It is likely that one of the arguments passed is an integer, whereas a character string is expected.
you’ve identified the cause, but I think my pc is blocking python files.

That’s right, the variable in question isrun_name and it should be a string, not an integer.

Can you please submit a bug report (zip file), or show me the .mfx file?
There should be a line in the mfx file that has something like
run_name = xyz
What does that line say?