Error while finding module specification for 'astrometry.util.image2pnm'

26 views
Skip to first unread message

Ashish Kumar Mandal

unread,
Sep 10, 2024, 8:18:01 AMSep 10
to astrometry
Hi all,

Recently I have installed astrometry on ubuntu 20.04. When I tried to solve a field I see the following errors. Please anyone can suggest on this error.

Reading input file 1 of 1: "apod4.jpg"...
/usr/bin/python3: Error while finding module specification for 'astrometry.util.image2pnm' (ModuleNotFoundError: No module named 'astrometry.util')
augment-xylist.c:590:backtick Failed to run command: /usr/bin/python3 -m astrometry.util.image2pnm --infile apod4.jpg --uncompressed-outfile /tmp/tmp.uncompressed.mPheQR --outfile /tmp/tmp.ppm.rTgpTT --ppm --mydir /usr/bin/solve-field
 ioutils.c:567:run_command_get_outputs Command failed: return value 1

Regards,
Ashish

Dustin Lang

unread,
Sep 10, 2024, 8:26:20 AMSep 10
to Ashish Kumar Mandal, astrometry
What is the full solve-field command you are running?

Did you install from the source code, or from the Ubuntu package?

cheers,
dustin

--
You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astrometry+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astrometry/c49f4e4a-71fa-43ff-bdfc-a9880924b74bn%40googlegroups.com.

Dustin Lang

unread,
Sep 10, 2024, 9:46:44 AMSep 10
to Ashish Kumar Mandal, astrometry
Bringing this back to the mailing list...

Can you please add a "-v" to your solve-field command to get more verbose logging.

The "image2pnm" script is supposed to be able to find the python code itself.  What happens if you run "image2pnm", or "/usr/bin/image2pnm"?

And what about "set | grep PYTHON"

cheers,
dustin


Conversation leading up to this:

> command is:  ashish@ashish-IdeaPad-Gaming-3-15IHU6:~/Documents/PhD/Telescope_Automation$ solve-field apod4.jpg
> I have installed it from source code.
As the error message says, python is not finding the astrometry.util module.

Depending on how your PYTHONPATH environment variable is set, sometimes python can get confused if there is a directory named "astrometry" in your current directory... eg if you're still in the astrometry.net source directory.  So try

cd
solve-field ~/Documents/PhD/Telescope_Automation/apod4.jpg

> It works when I run the command 'solve-field /home/ashish/Documents/PhD/Telescope_Automation/apod4.jpg' in the directory-'/home/ashish/astrometry.net-0.95', where 'util' folder is present.
> How can I set path so that code will automatically pick up the util from its position.






Reply all
Reply to author
Forward
0 new messages