Below is a small test case example which works in PyQt5 (read on for the solution in PyQt6). Here’s the radial gradient (saved to a file named “gradient.svg”) and the test program.

The svg
<svg width="400" height="150">
<defs>
<radialGradient id="grad1"><stop offset="0%" stop-color="#ff0000" stop-opacity="1.0" /><stop offset="50%" stop-color="#e70000" stop-opacity="1.0" /><stop offset="100%" stop-color="#9e0000" stop-opacity="0.0" /></radialGradient>
</defs>
<ellipse fill="url(#grad1)" cx="200" cy="70" rx="85" ry="55"/>
<text x="150" y="86" fill="green" font-family="Verdana" font-size="45">SVG</text>
</svg>
The test program
import math
import sys
from PyQt5.QtWidgets import QApplication, QMainWindow, QGraphicsScene, QGraphicsView
from PyQt5.QtSvg import QGraphicsSvgItem
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.scene = QGraphicsScene()
self.viewer = QGraphicsView()
self.setCentralWidget(self.viewer)
svg = QGraphicsSvgItem('gradient.svg')
self.scene.addItem(svg)
self.viewer.setScene(self.scene)
app = QApplication(sys.argv)
w = MainWindow()
w.show()
app.exec_()
The same code in PyQt6, which just needs to change the import for from PyQt6.QtSvgWidgets import QGraphicsSvgItem
import math
import sys
from PyQt6.QtWidgets import QApplication, QMainWindow, QGraphicsScene, QGraphicsView
from PyQt6.QtSvgWidgets import QGraphicsSvgItem
class MainWindow(QMainWindow):
def __init__(self):
super().__init__()
self.scene = QGraphicsScene()
self.viewer = QGraphicsView()
self.setCentralWidget(self.viewer)
svg = QGraphicsSvgItem('gradient.svg')
self.scene.addItem(svg)
self.viewer.setScene(self.scene)
app = QApplication(sys.argv)
w = MainWindow()
w.show()
app.exec()
Switching out the radial gradient for a linear one, it works, e.g.
<svg width="400" height="150">
<defs>
<linearGradient id="grad1" y1="0%" x1="0%" y2="0%" x2="100%">
<stop offset="0%" style="stop-color:rgb(255,255,0);stop-opacity:1"/>
<stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1"/>
</linearGradient>
</defs>
<ellipse fill="url(#grad1)" cx="200" cy="70" rx="85" ry="55"/>
<text x="150" y="86" fill="green" font-family="Verdana" font-size="45">SVG</text>
</svg>
Looks like the following (in PyQt6)

I looked up some other radial gradients online, and some don’t throw the error. Porting back the attributes of the elements that work I found that adding an r (radius) attribute to the radialGradient will mean it doesn’t throw the error. The value necessary to give the expected gradient is 0.5
<radialGradient id="grad1" r="0.5">
<stop offset="0%" stop-color="#ff0000" stop-opacity="1.0"/>
<stop offset="50%" stop-color="#e70000" stop-opacity="1.0"/>
<stop offset="100%" stop-color="#9e0000" stop-opacity="0.0"/>
</radialGradient>
It makes some sense, in that a radial gradient doesn’t really make sense without a radius.
The result with the above

Final SVG code
<svg width="400" height="150">
<defs>
<radialGradient id="grad1" r="0.5">
<stop offset="0%" stop-color="#ff0000" stop-opacity="1.0"/>
<stop offset="50%" stop-color="#e70000" stop-opacity="1.0"/>
<stop offset="100%" stop-color="#9e0000" stop-opacity="0.0"/>
</radialGradient>
</defs>
<ellipse fill="url(#grad1)" cx="200" cy="70" rx="85" ry="55"/>
<text x="150" y="86" fill="green" font-family="Verdana" font-size="45">SVG</text>
</svg>