Modify

Opened 2 years ago

Closed 2 years ago

#5949 closed defect (fixed)

can not execute script with shebang

Reported by: jstein Owned by: jstein
Priority: critical Component: Plugin ext_tools
Version: Keywords:
Cc:

Description

/home/stein/.josm/plugins/fuzzer/scanaerial.py 102.3769078311502 68.4571777515407 10.828522668411914
/usr/bin/env: python
: No such file or directory

where scanaerial.py is this here:
https://github.com/jonasstein/scanaerial

NB: The ':' after env does not exist in scanaerial.py

Attachments (0)

Change History (8)

comment:1 Changed 2 years ago by Upliner

I'm not sure that error is in ext_tools. Does the command "/usr/bin/env python" work in regular shell?

comment:2 Changed 2 years ago by Upliner

  • Owner changed from Upliner to jstein
  • Status changed from new to needinfo

If it's not a shell or env bug, I have no idea what to do with it anyway...

comment:3 Changed 2 years ago by jstein

yes it looks where the system has "python" and starts it.

$ /usr/bin/env python                
Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) 
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 


But this will fail:
$ /usr/bin/env: python
zsh: no such file or directory: /usr/bin/env:

i have no idea where the ':' comes from

comment:4 Changed 2 years ago by Upliner

I've changed Windows linefeeds to Unix ones, and it's worked for me. I've pushed this fix to GitHub, try it out.

Last edited 2 years ago by Upliner (previous) (diff)

comment:5 Changed 2 years ago by jstein

where can i find a .jar?
or how should i compile this:
https://github.com/Upliner/josm-ext-tools

comment:6 Changed 2 years ago by Upliner

No, I've changed only python scripts at https://github.com/jonasstein/scanaerial, just pull them and try again.

comment:7 Changed 2 years ago by jstein

that solved it thank you.
=> you can close the ticket
i will create a release for ext_tools now

comment:8 Changed 2 years ago by Upliner

  • Resolution set to fixed
  • Status changed from needinfo to closed

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.