Banksia GUI released

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

mephisto
Posts: 430
Joined: Mon Apr 03, 2006 10:10 am
Location: England

Re: Banksia GUI released

Post by mephisto »

Many thanks but unfortunately it did not work. Nevermind I will continue with Arena.
I was just interested to see if it worked with my Certabo board.
What's my next move? - to the fridge for another beer !!
User avatar
F.Huber
Posts: 853
Joined: Thu Mar 09, 2006 4:50 pm
Location: Austria

Re: Banksia GUI released

Post by F.Huber »

mephisto wrote: Thu Jan 23, 2020 4:52 pm When I tried to install the software, I got the two following system error messages.

VCRUNTIME140.dll was not found
MSVCP140.dll was not found

Any help would be really appreciated.
Both files are included in the ZIP package of BanksiaGUI (Windows version).
User avatar
AdminX
Posts: 6339
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: Banksia GUI released

Post by AdminX »

Live URLs do not appear to be working in Banksia. When I open a Live URL nothing happens. I tested it using PGN Mentor (Android App) using this URL from 'TheWeekInChess' : https://theweekinchess.com/assets/files ... agpa20.pgn

It works there, what it does is give me a PGN database of games from the event. I select the game I want to watch, and it updates the board with the current move as they are played.

However in Banksia when I input the URL nothing happens. It does not even appear to download the PGN file. I was wondering if I am doing something wrong.

Here is an example of live urls working in PGN Mentor. Click image for larger view.

Image

Here is another example using Hiarcs Chess Explorer:

Image
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
User avatar
AdminX
Posts: 6339
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: Banksia GUI released

Post by AdminX »

AdminX wrote: Fri Jan 24, 2020 3:59 pm Live URLs do not appear to be working in Banksia. When I open a Live URL nothing happens. I tested it using PGN Mentor (Android App) using this URL from 'TheWeekInChess' : https://theweekinchess.com/assets/files ... agpa20.pgn

It works there, what it does is give me a PGN database of games from the event. I select the game I want to watch, and it updates the board with the current move as they are played.

However in Banksia when I input the URL nothing happens. It does not even appear to download the PGN file. I was wondering if I am doing something wrong.

Here is an example of live urls working in PGN Mentor. Click image for larger view.



Here is another example using Hiarcs Chess Explorer:

I am sorry, I mean Chess PGN Master not Mentor :oops:
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Banksia GUI released

Post by phhnguyen »

AdminX wrote: Fri Jan 24, 2020 3:59 pm Live URLs do not appear to be working in Banksia. When I open a Live URL nothing happens. I tested it using PGN Mentor (Android App) using this URL from 'TheWeekInChess' : https://theweekinchess.com/assets/files ... agpa20.pgn
Thanks a lot for the report. I have been working on this bug.

==============================
OT:
This PGN file is strange/hard to download for me even I have tried many ways. I use QT QNetworkAccessManager to download. Usually, it works well with URLs, including SSL URLs. However, I can't download the above link. Program prints error: QNetworkReply::UnknownContentError and then "Not Acceptable".

Does anyone have experience/solution? I have tried to download it manually via web browsers, wget, curl... all work well but not my code :(

Thanks in advance.

The simplified code as below:

Code: Select all

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);

public slots:
    void downloadPgnUrlFinished(QNetworkReply *);
    void downloadError(QNetworkReply::NetworkError);
    void downloadPgnUrl(const QString&);

private:
    QNetworkAccessManager manager;
};

////////////
MainWindow::MainWindow(QWidget *parent) :
    ConnectWindow(parent)
{
    connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(downloadPgnUrlFinished(QNetworkReply*)));
}

void MainWindow::downloadPgnUrl(const QString& urlString)
{
    auto url = QUrl(urlString);
    QNetworkRequest request(url);

    if (urlString.startsWith("https")) {
        auto sslConfig = QSslConfiguration::defaultConfiguration();
        sslConfig.setProtocol(QSsl::AnyProtocol);
        sslConfig.setPeerVerifyMode (QSslSocket::VerifyNone);
        request.setSslConfiguration(sslConfig);
    }

    auto networkReply = manager.get(request);
    connect(networkReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(downloadError(QNetworkReply::NetworkError)));
}

void MainWindow::downloadError(QNetworkReply::NetworkError error)
{
    qDebug() << "Error: " << error; // <- QNetworkReply::UnknownContentError
}

void MainWindow::downloadPgnUrlFinished(QNetworkReply *reply)
{
    if (reply->error()) {
        qDebug() << "Error: " << reply->errorString(); // <- "Not Acceptable"
    } else  {
        auto text = QString::fromLocal8Bit(reply->readAll());
        qDebug() << "Downloaded text: " << text;
    }

    delete reply;
}

https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

Re: Banksia GUI released

Post by noobpwnftw »

The link gives the following in response: "content-type: application/x-chess-pgn".
How does your library handle such uncommon MIME type? From the error message, it seems paranoid about it and you may want to find a way to handle it as "text/plain".
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Banksia GUI released

Post by phhnguyen »

noobpwnftw wrote: Sun Jan 26, 2020 3:13 pm The link gives the following in response: "content-type: application/x-chess-pgn".
How does your library handle such uncommon MIME type? From the error message, it seems paranoid about it and you may want to find a way to handle it as "text/plain".
Thanks for the prompt help.
I have tried several ways but all didn't work with the same error (I commented out all code I have tried as below).

I think I use almost a low-level library thus I can control /read any data. If I use the wrong content type, I should not get the error.

Code: Select all

...
//    request.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("text/plain"));
//    request.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/x-chess-pgn"));
//    request.setHeader(QNetworkRequest::ContentTypeHeader, QStringLiteral("application/x-www-form-urlencoded"));
    request.setRawHeader("content-type", "text/plain");
//    request.setRawHeader("Accept", "*/*");

auto networkReply = manager.get(request);
...
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
noobpwnftw
Posts: 560
Joined: Sun Nov 08, 2015 11:10 pm

Re: Banksia GUI released

Post by noobpwnftw »

If this is HTTP code 406 from the server, then you might want to add more "Accept-???" headers as per curl or wget sends in your request.
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Banksia GUI released

Post by phhnguyen »

noobpwnftw wrote: Sun Jan 26, 2020 3:44 pm If this is HTTP code 406 from the server, then you might want to add more "Accept-???" headers as per curl or wget sends in your request.
It didn't work, same error.

It is strange that when I copied the PGN file to my website, using SSL too, my download code works very well with any header.
https://banksiagui.com
The most features chess GUI, based on opensource Banksia - the chess tournament manager
User avatar
AdminX
Posts: 6339
Joined: Mon Mar 13, 2006 2:34 pm
Location: Acworth, GA

Re: Banksia GUI released

Post by AdminX »

I am sure you probably have seen this documentation already, if not it might help.

https://doc.qt.io/qt-5/qnetworkaccessmanager.html
"Good decisions come from experience, and experience comes from bad decisions."
__________________________________________________________________
Ted Summers