Giter Site home page Giter Site logo

pyrefine's Issues

Fun3dAdaptationSteadyHistoryReader issues on Redhat and Windows

Fun3dAdaptationSteadyHistoryReader -> shell_utils.py -> unglob -> pattern input argument is not type string on some operating systems. Things ran find for me on Ubuntu, but I have issues with Redhat and windows.

Full error message on Redhat

File "/ascr/...... ../post.py", line 7, in <module>
    reader = Fun3dAdaptationSteadyHistoryReader("./Flow", "naca0012_", number_of_meshes=22)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/apps/amd/friday/anaconda3/lib/python3.11/site-packages/pyrefine/post_processing/fun3d_file_reader.py", line 42, in __init__

    self._read_data(number_of_meshes)
  File "/usr/local/apps/amd/friday/anaconda3/lib/python3.11/site-packages/pyrefine/post_processing/fun3d_file_reader.py", line 49, in _read_data
    self.number_of_nodes = self._read_number_of_nodes_for_all_meshes()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/apps/amd/friday/anaconda3/lib/python3.11/site-packages/pyrefine/post_processing/fun3d_file_reader.py", line 92, in _read_number_of_nodes_for_all_meshes
    number_of_nodes[imesh-1] = self._read_number_of_nodes_from_grid_info(filepath)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/apps/amd/friday/anaconda3/lib/python3.11/site-packages/pyrefine/post_processing/fun3d_file_reader.py", line 99, in _read_number_of_nodes_from_grid_info
    node_line = grep('number of nodes', file, head=1)[0]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/apps/amd/friday/anaconda3/lib/python3.11/site-packages/pyrefine/shell_utils.py", line 23, in grep
    for file in unglob(filename):
                ^^^^^^^^^^^^^^^^
  File "/usr/local/apps/amd/friday/anaconda3/lib/python3.11/site-packages/pyrefine/shell_utils.py", line 14, in unglob
    if '*' in pattern:
       ^^^^^^^^^^^^^^
TypeError: argument of type 'PosixPath' is not iterable

Partial error message on Windows

  File "C:\Apps\Anaconda3\lib\site-packages\pyrefine\shell_utils.py", line 14, in unglob
    if '*' in pattern:
TypeError: argument of type 'WindowsPath' is not iterable

I'll send a pull request with a workaround that worked for me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.