pysdr icon indicating copy to clipboard operation
pysdr copied to clipboard

Python3 incompatibility

Open kaklik opened this issue 4 years ago • 4 comments

$ python3 3dwf.py 10.1.1.132 Traceback (most recent call last): File "3dwf.py", line 33, in pybuf_from_memory = ctypes.pythonapi.PyBuffer_FromReadWriteMemory File "/usr/lib/python3.8/ctypes/init.py", line 386, in getattr func = self.getitem(name) File "/usr/lib/python3.8/ctypes/init.py", line 391, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: python3: undefined symbol: PyBuffer_FromReadWriteMemory

kaklik avatar Aug 01 '20 23:08 kaklik

Zároveň to vypadá, že pyfits už nepodporuje python pod verzi 3. Takže teď zřejmě nejde použít pysdr-recviewer s FITS soubory

Protože buď:

$ python2 pysdr-recviewer 20200809082529162_SVAKOV-R12_raws.fits 
Traceback (most recent call last):
  File "pysdr-recviewer", line 5, in <module>
    main()
  File "/home/kaklik/repos/bolidozor/pysdr/pysdr/recviewer.py", line 165, in main
    sample_rate, signal = read_file(sys.argv[1])
  File "/home/kaklik/repos/bolidozor/pysdr/pysdr/recviewer.py", line 144, in read_file
    import pyfits
ImportError: No module named pyfits

Nebo

$ python3 pysdr-recviewer 20200809082529162_SVAKOV-R12_raws.fits 
Traceback (most recent call last):
  File "pysdr-recviewer", line 4, in <module>
    from pysdr.recviewer import main
  File "/home/kaklik/repos/bolidozor/pysdr/pysdr/recviewer.py", line 13, in <module>
    from pysdr.waterfall import *
  File "/home/kaklik/repos/bolidozor/pysdr/pysdr/waterfall.py", line 18, in <module>
    from pysdr.input import RawSigInput, JackInput
  File "/home/kaklik/repos/bolidozor/pysdr/pysdr/input.py", line 5, in <module>
    import pysdr.ext as ext
ImportError: /home/kaklik/repos/bolidozor/pysdr/pysdr/ext.cpython-38-x86_64-linux-gnu.so: undefined symbol:         PyString_FromStringAndSize

kaklik avatar Aug 10 '20 21:08 kaklik

Fixed in e1d4167f250c9

povik avatar Aug 31 '23 14:08 povik

While 3dwf.py should be Python 3 compatible, the remaining programs (pysdr-waterfall and -recviewer) don't seem to be. Reopening this issue.

povik avatar Aug 31 '23 20:08 povik

I fixed all obvious Python3 incompatibilities. But unfortunately, there arose a mistake somewhere in the code, because the spectrum waterfall is twice as fast as the overlay. The result is that there are gaps between the spectrum texture every ten seconds.

kaklik avatar Apr 19 '24 22:04 kaklik