1

I'm using the Pannellum panorama viewer to do a tour experience of a campus. To improve the support for mobile devices I want to use the Pannellum's multiresolution format using the included python script to generate it form images.

I'm a mac user with very little python knowledge and gotten around to be able to execute the script from terminal (yay!)

The comments on the python script state the requirements:

# Requires Python 3.2+ (or Python 2.7), the Python Pillow package,
# and nona (from Hugin)

I'm running Python 2.7.10, I did install the Pillow package and got the 'nona' executable from the the 'HuginStitchProject.app' (From the package content) which was downloaded from their sourceforge mirror.

When executing the code with python generate.py basketball_court.jpg from the folder contaning the nona executable mentioned earlier, the *.jpg file and generate.py, I get the following error which I am not able to resolve:

Processing input image information...
Generating cube faces...
Traceback (most recent call last):
  File "generate.py", line 106, in <module>
    subprocess.check_call([args.nona, '-o', os.path.join(args.output, 'face'), os.path.join(args.output, 'cubic.pto')])
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I see the OSError: [Errno 2] No such file or directory, which file am I missing? Which file is it unable to see?

Any help would be greatly appreciated :)

EDIT: I'm pretty sure that none executable I've got is not the dependency. I don't even know what a executable should look like. Should I be looking for a nona.py, nona.exe, nona.sh or something else?

Matthew Abrman
  • 711
  • 10
  • 18

1 Answers1

0

subprocess.check_call is used to run something in the terminal, but looks like it cannot find the nona executable.

If you edit generate.py and put print(args.nona) before line 106, you'll see what it's trying to call.

Most likely you need to check paths, perhaps put the nona executable in the same dir as generate.py or the one you're running from. Also check it has the executable flag set.

Checking the generate.py source, I see it gets args.nona from its own parameters, or uses a default if you don't explicitly set it (line 59).

The default is set by trying to find an executable called "nona", else set it to None (line 37).

Hugo
  • 27,885
  • 8
  • 82
  • 98