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

Add shebang to main script #13

Merged
merged 1 commit into from Sep 10, 2017

Conversation

2 participants
@Tiryoh
Contributor

Tiryoh commented Sep 8, 2017

Arrangement to allow for running via ./splatnet2statink.py
#11 (comment)
#11 (comment)

@Tiryoh Tiryoh force-pushed the Tiryoh:spike branch from c66e875 to 401c632 Sep 8, 2017

Add shebang to main script
this makes availabe to run as './splatnet2statink.py'

@Tiryoh Tiryoh force-pushed the Tiryoh:spike branch from 401c632 to e368c02 Sep 8, 2017

@frozenpandaman frozenpandaman self-assigned this Sep 8, 2017

@Tiryoh

This comment has been minimized.

Contributor

Tiryoh commented Sep 8, 2017

@frozenpandaman,

This is an additional information.
I get the following error to run main Python script on my ubuntu server by ./splatnet2statink.py on current version( 579d5f9 ).

$ ./splatnet2statink.py
import.im6: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import.im6: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import.im6: unable to open X server `' @ error/import.c/ImportImageCommand/368.
import.im6: unable to open X server `' @ error/import.c/ImportImageCommand/368.
from: can't read /var/mail/io
from: can't read /var/mail/operator
./splatnet2statink.py: 11: ./splatnet2statink.py: A_VERSION: not found
Warning: unknown mime-type for "splatnet2statink v" -- using "application/octet-stream"
Warning: unknown mime-type for "+" -- using "application/octet-stream"
Warning: unknown mime-type for "A_VERSION" -- using "application/octet-stream"
Error: no such file "splatnet2statink v"
Error: no such file "+"
Error: no such file "A_VERSION"
./splatnet2statink.py: 15: ./splatnet2statink.py: try:: not found
./splatnet2statink.py: 16: ./splatnet2statink.py: Syntax error: "(" unexpected
@frozenpandaman

This comment has been minimized.

Owner

frozenpandaman commented Sep 8, 2017

Thanks for the info @Tiryoh. I received pretty much the same errors when testing on my own Ubuntu server. This can be fixed by adding the shebang to all .py files (so, to splatoon2statink.py, dbs.py, and iksm.py). Feel free to amend your PR/branch to include this, or I can add it myself just as easily when I merge this PR in a day or two (after I have a chance to update the readme and work out another security issue, as I mentioned before).

@Tiryoh

This comment has been minimized.

Contributor

Tiryoh commented Sep 8, 2017

@frozenpandaman,
I didn't need to add shebang to dbs.py and iksm.py (only to splatoon2statink.py), but do you wish to add shebang to dbs.py and iksm.py ?
This error #13 (comment) occurs only if there are no shebang to all files (current version( 579d5f9 ), no shebang in splatoon2statink.py, dbs.py, and iksm.py) on my ubuntu server and macOS.

@frozenpandaman

This comment has been minimized.

Owner

frozenpandaman commented Sep 8, 2017

@Tiryoh, It runs fine on macOS with the shebang only in splatoon2statink.py for me, but when testing on an Ubuntu server (shared server, used for web hosting) it was giving me that error until I added the line in all three, strangely. Though you are right, it should work/only be required by the main file that will be executed, and not in the others (as they are only imported). So I'll look into this as well. I think we're fine just adding it to the main file for now, so no worries. :)

@Tiryoh

This comment has been minimized.

Contributor

Tiryoh commented Sep 9, 2017

OK, I understand the situation!

@frozenpandaman frozenpandaman merged commit 5f8ce22 into frozenpandaman:master Sep 10, 2017

@frozenpandaman

This comment has been minimized.

Owner

frozenpandaman commented Sep 10, 2017

Hm, seemed to work on my Unix environment this time with only the shebang in the main script, so that's good.

Merged after fixing "security" check in eb7910d, and updated the readme with a note about chmod +x in e0dc084. Thanks again @Tiryoh! Please let me know if you have any problems.

@Tiryoh

This comment has been minimized.

Contributor

Tiryoh commented Sep 10, 2017

@frozenpandaman,
It worked fine on my environment, too.
Thank you so much for the update!

@Tiryoh Tiryoh deleted the Tiryoh:spike branch Sep 18, 2017

@frozenpandaman frozenpandaman removed their assignment Jan 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment