Notices


Reply
Thread Tools
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#51
Bad news: the new version of PyOtherSide included in Iijoki seems significantly broken, at least with respect to how I'm using it. It's somewhat difficult or at least seriously inconvenient to work around, so it might take a while to fix this.

https://together.jolla.com/question/156736/

Could someone still using the previous version of SFOS download and share the RPM of "pyotherside-qml-plugin-python3-qt5"? Downgrading to that could be a temporary work-around.

There might be other problems with Iijoki as well, but I'd need this fixed before I can proceed.
 

The Following 8 Users Say Thank You to otsaloma For This Useful Post:
Jordi's Avatar
Posts: 400 | Thanked: 708 times | Joined on Jun 2011 @ Geneva - CH
#52
Here you go.
 

The Following 5 Users Say Thank You to Jordi For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#53
Thanks, but that 1.4.4 version didn't seem to work either. Probably something else in the Iijoki update has triggered the bug.

But anyway, on second thought, it seems fairly easy to work around this after all, in the common case of scalar arguments and assuming no weird values. For anyone else interested, something like the below seems to work.

Code:
Python {
    id: py
    ...
    function call_sync(func, args) {
        // XXX: Work around a call_sync bug by using evaluate.
        // https://github.com/thp/pyotherside/issues/49
        args = args.map(py.stringify).join(", ");
        return py.evaluate("%1(%2)".arg(func).arg(args));
    }
    function stringify(obj) {
        // Return Python string representation of obj.
        if (Array.isArray(obj)) {
            return "[%1]".arg(obj.map(py.stringify).join(", "));
        } else if (obj === null || obj === undefined) {
            return "None";
        } else if (typeof obj === "string") {
            return "'%1'".arg(obj.replace(/'/, "\\'"));
        } else if (typeof obj === "number") {
            return obj.toString();
        } else if (typeof obj === "boolean") {
            return obj ? "True" : "False";
        } else if (typeof obj === "object") {
            // Assume all remaining objects are dictionaries.
            return "{%1}".arg(Object.keys(obj).map(function(x) {
                return [py.stringify(x), py.stringify(obj[x])].join(": ");
            }).join(", "));
        } else {
            throw "Unrecognized argument type: %1: %2"
                .arg(obj).arg(typeof obj);
        }
    }
}

Last edited by otsaloma; 2017-02-15 at 22:12. Reason: Updated work-around code in case someone wants to use it.
 

The Following 6 Users Say Thank You to otsaloma For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#54
0.28.3 available at OpenRepos. I didn't notice any bugs related to Qt 5.6, only that above PyOtherSide bug. In addition to the fix, Italian and Polish translations added.
 

The Following 4 Users Say Thank You to otsaloma For This Useful Post:
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#55
Originally Posted by otsaloma View Post
0.28.3 available at OpenRepos. I didn't notice any bugs related to Qt 5.6, only that above PyOtherSide bug. In addition to the fix, Italian and Polish translations added.
Have you changed the vendor name in the rpm? I get this when trying to update with zypper (packagekit won't update it):

Code:
There is an update candidate for 'harbour-poor-maps', but it is from different vend
or. Use 'zypper install harbour-poor-maps-0.28.3-1.noarch' to install this candidat
e.
 

The Following User Says Thank You to Feathers McGraw For This Useful Post:
otsaloma's Avatar
Posts: 141 | Thanked: 1,530 times | Joined on May 2011 @ Finland
#56
Originally Posted by Feathers McGraw View Post
Have you changed the vendor name in the rpm? I get this when trying to update with zypper (packagekit won't update it):
I don't even know what "vendor" means. There's no vendor in the spec file or in "rpm -qpi" output. I haven't changed anything in the packaging. Sounds like some zypper oddity.
 

The Following 2 Users Say Thank You to otsaloma For This Useful Post:
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#57
Originally Posted by otsaloma View Post
I don't even know what "vendor" means. There's no vendor in the spec file or in "rpm -qpi" output. I haven't changed anything in the packaging. Sounds like some zypper oddity.
Not a zypper oddity, zypper is just giving more information. Trying to update with e.g. warehouse was giving "no update candidate".

There might not be a vendor now, but there used to be! It was meego for the older packages (at least, that's what zypper said when I forced an upgrade: changing vendor "meego -> ").

Perhaps something in the SDK or build environment used to add meego as vendor if none was specified, and you're building in a new SDK which doesn't do that any more?

It's not a problem because you can always uninstall and reinstall, or do what I did and force the update using zypper, but people are unlikely to understand why it won't update.
 

The Following 2 Users Say Thank You to Feathers McGraw For This Useful Post:
Posts: 343 | Thanked: 819 times | Joined on Jan 2010 @ Paris, France
#58
Originally Posted by otsaloma View Post
I don't even know what "vendor" means. There's no vendor in the spec file or in "rpm -qpi" output. I haven't changed anything in the packaging. Sounds like some zypper oddity.
in case that helps, there is a section in https://harbour.jolla.com/faq about the 'vendor' issue...
 

The Following 4 Users Say Thank You to P@t For This Useful Post:
Posts: 387 | Thanked: 707 times | Joined on May 2015 @ Italy
#59
Does the new version work on 2.0.4 ? I would like to check my translation but I can't update it through Warehouse
 

The Following User Says Thank You to claustn For This Useful Post:
Feathers McGraw's Avatar
Posts: 654 | Thanked: 2,368 times | Joined on Jul 2014 @ UK
#60
Originally Posted by claustn View Post
Does the new version work on 2.0.4 ? I would like to check my translation but I can't update it through Warehouse
Same problem as I had? You can update using this command in zypper:

Code:
devel-su zypper install harbour-poor-maps-0.28.3-1.noarch
If you don't have zypper installed, install it first with:

Code:
pkcon install zypper
 

The Following 4 Users Say Thank You to Feathers McGraw For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 17:07.