Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local variable 'newline' referenced before assignment #54

Open
sbland opened this issue Apr 7, 2020 · 0 comments
Open

local variable 'newline' referenced before assignment #54

sbland opened this issue Apr 7, 2020 · 0 comments

Comments

@sbland
Copy link

sbland commented Apr 7, 2020

    tree = fparser.api.parse(stream.read(), isfree=True, isstrict=True)
  File ".../vendor/f2py/fparser/api.py", line 158, in parse
    parser.analyze()
  File ".../vendor/f2py/fparser/parsefortran.py", line 90, in analyze
    self.block.analyze()
  File ".../vendor/f2py/fparser/utils.py", line 209, in new_func
    func(self)
  File ".../vendor/f2py/fparser/block_statements.py", line 223, in analyze
    stmt.analyze()
  File ".../vendor/f2py/fparser/utils.py", line 209, in new_func
    func(self)
  File ".../vendor/f2py/fparser/block_statements.py", line 324, in analyze
    stmt.analyze()
  File ".../vendor/f2py/fparser/utils.py", line 209, in new_func
    func(self)
  File ".../vendor/f2py/fparser/block_statements.py", line 1098, in analyze
    args,rest = parse_bind(spec)
  File ".../vendor/f2py/fparser/utils.py", line 89, in parse_bind
    newline = newline[4:].lstrip()
UnboundLocalError: local variable 'newline' referenced before assignment

fixed by adding newline = line after line 87 in fparser/utils.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant