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

d.polar: fix launch module (py3) and write output EPS file #1107

Merged
merged 1 commit into from
Nov 22, 2020

Conversation

tmszi
Copy link
Member

@tmszi tmszi commented Nov 20, 2020

To Reproduce:

Steps to reproduce the behavior:

  1. d.polar map=aspect output=/tmp/polar.eps

Error message:

Traceback (most recent call last):
  File "/usr/lib64/grass79/scripts/d.polar", line 536, in <module>
    main()
  File "/usr/lib64/grass79/scripts/d.polar", line 431, in main
    rawf = file(rawfile, 'w')
NameError: name 'file' is not defined

Expected behavior:

d.polar module should launch normally without error message.

@tmszi tmszi added the bug Something isn't working label Nov 20, 2020
@neteler
Copy link
Member

neteler commented Nov 20, 2020

I tested it and it now works when giving an absolute output path.

Yet it fails with a relative path:

d.polar map=aspect output=polar.eps
 100%
Calculating statistics for polar diagram... (be patient)
ERROR: EPS output file path <polar.eps>, doesn't exists. Set new output
       file path.

@neteler
Copy link
Member

neteler commented Nov 20, 2020

While at it, would you mind to also fix these two flake8-identified errors?


 ./d.polar/d.polar.py:516:17: E124 closing bracket does not match visual indentation
                ),
                ^
./d.polar/d.polar.py:524:17: E124 closing bracket does not match visual indentation
                ),
                ^
2     E124 closing bracket does not match visual indentation

@neteler neteler mentioned this pull request Nov 20, 2020
@tmszi
Copy link
Member Author

tmszi commented Nov 21, 2020

I tested it and it now works when giving an absolute output path.

Yet it fails with a relative path:

d.polar map=aspect output=polar.eps
 100%
Calculating statistics for polar diagram... (be patient)
ERROR: EPS output file path <polar.eps>, doesn't exists. Set new output
       file path.

Fixed in the c99de50.

@tmszi
Copy link
Member Author

tmszi commented Nov 21, 2020

While at it, would you mind to also fix these two flake8-identified errors?


 ./d.polar/d.polar.py:516:17: E124 closing bracket does not match visual indentation
                ),
                ^
./d.polar/d.polar.py:524:17: E124 closing bracket does not match visual indentation
                ),
                ^
2     E124 closing bracket does not match visual indentation

Yes of course I fixed in the c99de50.

@neteler neteler added this to the 7.8.5 milestone Nov 22, 2020
@neteler neteler merged commit c7ec0a8 into OSGeo:master Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants