https://bugs.kde.org/show_bug.cgi?id=479508

            Bug ID: 479508
           Summary: interface between Python and C++
    Classification: Applications
           Product: audiotube
           Version: 23.08.4
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: j...@kaidan.im
          Reporter: crau...@disroot.org
  Target Milestone: ---

SUMMARY
***
The message you see in the logs indicates that there is an issue with casting a
Python object of type NoneType to a C++ object of type std::string. This
suggests that there is a problem with the way the Python and C++ code
interacts.
***

STEPS TO REPRODUCE
craudio@acer-debian:~$ flatpak run org.kde.audiotube
QSocketNotifier: Can only be used with threads started with QThread
futuresql: Migrations finished
futuresql: Running "select distinct (search_query) from searches order by
search_id desc"
futuresql: Running "select * from favourites natural join songs order by
favourites.rowid desc"
futuresql: Running "select * from played_songs natural join songs"
futuresql: Running "select * from played_songs natural join songs order by
plays desc limit 10"
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
futuresql: Running "select * from playlists"
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
futuresql: Running "select * from playlists"
futuresql: Running "select * from playlists"
qrc:/main.qml:98:17: Unable to assign null to double
qrc:/MinimizedPlayerControls.qml:246:13: Unable to assign bool to int
qrc:/dialogs/PlaylistDialog.qml:42:9: QML ImportPlaylistDialog: Binding loop
detected for property "implicitHeight"
qrc:/dialogs/PlaylistDialog.qml:38:9: QML AddPlaylistDialog: Binding loop
detected for property "implicitHeight"
qrc:/LibraryPage.qml:441:9: QML RenamePlaylistDialog: Binding loop detected for
property "implicitHeight"
qrc:/dialogs/PlaylistDialog.qml:42:9: QML ImportPlaylistDialog: Binding loop
detected for property "implicitHeight"
qrc:/dialogs/PlaylistDialog.qml:38:9: QML AddPlaylistDialog: Binding loop
detected for property "implicitHeight"
qrc:/SearchWithDropdown.qml:241:9: QML NumberAnimation: Binding loop detected
for property "from"
qrc:/main.qml:98:17: Unable to assign null to double
qrc:/MinimizedPlayerControls.qml:246:13: Unable to assign bool to int
qrc:/MinimizedPlayerControls.qml:142:9: Unable to assign null to
QQuickAnchorLine
futuresql: Running "insert into searches (search_query) values (?)"
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
futuresql: Running "select * from playlists"
futuresql: Running "insert into searches (search_query) values (?)"
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
futuresql: Running "select * from playlists"
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
Cannot initialize model with data QJsonObject(). missing: QJsonValue(string,
"urls")
futuresql: Running "select * from playlists"
qrc:/components/DoubleActionButton.qml:131:9: Unable to assign [undefined] to
int
Unable to cast Python instance of type <class 'NoneType'> to C++ type
'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>
>

OBSERVED RESULT

Here's a breakdown of the error message:

    Unable to cast Python instance: This phrase indicates that the system tried
to convert a Python object into another data type but failed.
    of type <class 'NoneType'>: This part of the message tells us what type of
Python object was being converted. In this case, it's a NoneType, which means
the object has no value or doesn't exist.
    to C++ type 'std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >': This part of the message shows the type of object that
the system tried to convert the Python object to. It's a C++ string class
called std::string.

The error occurs because the Python NoneType object cannot be directly
converted to a C++ std::string object. The two types are not compatible, so the
conversion fails.

This issue might happen when your application tries to use a Python module or
function that returns None (or no value) instead of a string, while the C++
side expects a string as input. To fix this, you need to check the interface
between Python and C++ and ensure that the types match correctly. You may also
want to verify that the Python module or function you're using behaves as
expected and returns the correct type of data.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Debian testing
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10
Kernel: 6.5.0-5-amd64 (64bit)
Wayland

ADDITIONAL INFORMATION

The same occur in Gnome 44.7

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to