包给我int的无效文字

时间:2018-11-25 21:31:04

标签: python int pycharm

我在PyCharm上使用openbte软件包,但出现此错误:

(venv) C:\Users\turtl\PycharmProjects\untitled>openbte -g -type=porous/square_lattice -shape=circle -porosity=0.25 -lx=10 -ly=10
Traceback (most recent call last):
  File "C:\Users\turtl\PycharmProjects\untitled\venv\Scripts\openbte-script.py", line 11, in <module>
    load_entry_point('openbte==0.9.24', 'console_scripts', 'openbte')()
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\__main__.py", line 47, in main
    Geometry(**vars(args))
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 83, in __init__
    data = self.compute_mesh_data()
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 91, in compute_mesh_data
    self.import_mesh()
  File "C:\Users\turtl\PycharmProjects\untitled\venv\lib\site-packages\openbte\geometry.py", line 470, in import_mesh
    n_nodes = int(f.readline())
ValueError: invalid literal for int() with base 10: '28 28 1 0\n'

基本上,我不太确定错误的含义。经过研究,我认为这意味着某些值不能转换为int。有问题的f文件是https://textuploader.com/d3uab。它似乎在第一行就失败了。任何人都对如何使它起作用有任何想法?

1 个答案:

答案 0 :(得分:0)

问题是我正在使用更新的gmsh(4.0)版本。下载gmsh 3.0后,该格式对于openbte是正确的。