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

wrong output file name in some situations #6

Closed
hadisfr opened this issue Mar 8, 2018 · 2 comments
Closed

wrong output file name in some situations #6

hadisfr opened this issue Mar 8, 2018 · 2 comments

Comments

@hadisfr
Copy link

hadisfr commented Mar 8, 2018

It seems that the mossum uses the third <p> tag of MOSS result page as the name of output picture, if presented in HTML DOM. (lines 209 & 210)

    if len(ps) >= 2:
        name = ps[2].text.strip()

But MOSS uses <p> tags to show errors, too. In situations that there isn't any <p>title</p> in the result page and there are some <p>error</p> there, mossum picks up a wrong statement as the png filename and in some special situations prevent mossum from making output at all.
e.g.

...
</TABLE>
<HR>
Any errors encountered during this query are listed below.<p>Could not open file "2/"
<p>Could not open file "2/"
<p></BODY>
</HTML>

I suggest it would be better to remove those two lines from code.

@hadisfr hadisfr changed the title wrong output file name in some stuations wrong output file name in some situations Mar 8, 2018
@hjalti
Copy link
Owner

hjalti commented Mar 10, 2018

Ah, OK. I did not know that Moss gave error feedback. I'll fix this at some point, but can the -o option be used as a workaround?

@hadisfr
Copy link
Author

hadisfr commented Mar 11, 2018

Yes. it works correctly with -o argument. (Except that still MOSS error message comes after "Generating image for " in terminal output.)
Thank you!

@hadisfr hadisfr closed this as completed Jul 5, 2018
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

2 participants