module 'xpa' has no attribute 'xpaaccess'

Asked by gubu

Cannot use pyds9 and xpa:

--------------------------------------------------------------------------------------------
python3
>>> import pyds9
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/guenter/pyds9.py", line 800, in <module>
    ds9_xpans()
  File "/home/guenter/pyds9.py", line 251, in ds9_xpans
    if xpa.xpaaccess(b"xpans", None, 1) is None:
AttributeError: module 'xpa' has no attribute 'xpaaccess'
--------------------------------------------------------------------------------------------

Works well on Arch Linux
Import works in python2.7 but I need python3.

gubu

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu python-pyds9 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

For python3 you have to install the package python3-pyds9.

Revision history for this message
gubu (ggebhard) said :
#2

Thank you Manfred,

I have forgotten to post the full story.
On my older laptop with Ubuntu 16.04 python3-pyds9 and
import pyds9 works without error.

On my newer laptop with a fresh Ubuntu 17.10 and with python3-pyds9
import pyds9 does not.

My very old Dell with Arch 32bit works more reliable than the two
Lenovos with 64 Bit.

My CCD-Software is written in Python3 and I don't want to go back to
Python2.

Am Sonntag, den 19.11.2017, 18:33 +0000 schrieb Manfred Hampl:
> Your question #660907 on python-pyds9 in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/python-pyds9/+question/6
> 60907
>
>     Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> For python3 you have to install the package python3-pyds9.
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

I am a bit astonished to see a file name "/home/guenter/pyds9.py"
The Ubuntu-provided file should be in "/usr/lib/python3/dist-packages/pyds9.py"

Can you check whether you have different versions of the involved files on your computer (maybe also outdated ones),
e.g. with the commands
sudo updatedb
locate xpa.py

Revision history for this message
gubu (ggebhard) said :
#4

Sorry. This file came from ARCH to make a diff. But now I reseted
everything on james (17.10):

guenter@james:~$ sudo updatedb
guenter@james:~$ locate pyds9.py
/usr/lib/python3/dist-packages/pyds9.py
guenter@james:~$ python3
Python 3.6.3 (default, Oct  3 2017, 21:45:48)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyds9
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/pyds9.py", line 800, in <module>
    ds9_xpans()
  File "/usr/lib/python3/dist-packages/pyds9.py", line 251, in
ds9_xpans
    if xpa.xpaaccess(b"xpans", None, 1) is None:
AttributeError: module 'xpa' has no attribute 'xpaaccess'
>>>

Am Montag, den 20.11.2017, 10:27 +0000 schrieb Manfred Hampl:
> Your question #660907 on python-pyds9 in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/python-pyds9/+question/6
> 60907
>
>     Status: Open => Needs information
>
> Manfred Hampl requested more information:
> I am a bit astonished to see a file name "/home/guenter/pyds9.py"
> The Ubuntu-provided file should be in "/usr/lib/python3/dist-
> packages/pyds9.py"
>
> Can you check whether you have different versions of the involved
> files on your computer (maybe also outdated ones),
> e.g. with the commands
> sudo updatedb
> locate xpa.py
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

What is the output of

locate xpa.py

(xpa, not pyds9)

Revision history for this message
gubu (ggebhard) said :
#6

/usr/lib/python3/dist-packages/xpa.py

Am Montag, den 20.11.2017, 11:27 +0000 schrieb Manfred Hampl:
> Your question #660907 on python-pyds9 in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/python-pyds9/+question/6
> 60907
>
>     Status: Open => Needs information
>
> Manfred Hampl requested more information:
> What is the output of
>
> locate xpa.py
>
> (xpa, not pyds9)
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

ok, seems correct.

What is the output of

ls -l /usr/lib/python3/dist-packages/xpa*
ls -l /usr/lib/python3/dist-packages/pyds9*

Revision history for this message
gubu (ggebhard) said :
#8

-rw-r--r-- 1 root root 37504 Aug  5 20:41 /usr/lib/python3/dist-
packages/xpa.cpython-36m-x86_64-linux-gnu.so
-rw-r--r-- 1 root root  6603 Jan 29  2016 /usr/lib/python3/dist-
packages/xpa.py
-rw-r--r-- 1 root root   295 Jan 29  2016 /usr/lib/python3/dist-
packages/pyds9-1.8.1.egg-info
-rw-r--r-- 1 root root 32058 Jan 28  2016 /usr/lib/python3/dist-
packages/pyds9.py

On ARCH there is a xpans in the same directory as xpa.py.

Am Montag, den 20.11.2017, 12:18 +0000 schrieb Manfred Hampl:
> Your question #660907 on python-pyds9 in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/python-pyds9/+question/6
> 60907
>
>     Status: Open => Needs information
>
> Manfred Hampl requested more information:
> ok, seems correct.
>
> What is the output of
>
> ls -l /usr/lib/python3/dist-packages/xpa*
> ls -l /usr/lib/python3/dist-packages/pyds9*
>

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

This seems to be an incompatibility between the packages python3-pyds9 and python3-imexam (providing the file /usr/lib/python3/dist-packages/xpa.cpython-36m-x86_64-linux-gnu.so)

Apparently python3-pyds9 does no more work as soon as python3-imexam is installed.

I suggest that you create a bug report.

Revision history for this message
gubu (ggebhard) said :
#10

Thank you for your extensive help.

vielen Dank

Am Montag, den 20.11.2017, 15:38 +0000 schrieb Manfred Hampl:
> Your question #660907 on python-pyds9 in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/python-pyds9/+question/6
> 60907
>
>     Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> This seems to be an incompatibility between the packages python3-
> pyds9
> and  python3-imexam (providing the file /usr/lib/python3/dist-
> packages/xpa.cpython-36m-x86_64-linux-gnu.so)
>
> Apparently python3-pyds9 does no more work as soon as python3-imexam
> is
> installed.
>
> I suggest that you create a bug report.
>

Can you help with this problem?

Provide an answer of your own, or ask gubu for more information if necessary.

To post a message you must log in.