Banksia GUI released

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

Moderators: Harvey Williamson, Dann Corbit, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
mephisto
Posts: 373
Joined: Mon Apr 03, 2006 8:10 am
Location: England

Re: Banksia GUI released

Post by mephisto » Thu Jan 23, 2020 8:06 pm

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: 808
Joined: Thu Mar 09, 2006 3:50 pm
Location: Austria
Contact:

Re: Banksia GUI released

Post by F.Huber » Thu Jan 23, 2020 8:43 pm

mephisto wrote:
Thu Jan 23, 2020 3: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: 5567
Joined: Mon Mar 13, 2006 1:34 pm
Location: Acworth, GA
Contact:

Re: Banksia GUI released

Post by AdminX » Fri Jan 24, 2020 2: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.

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: 5567
Joined: Mon Mar 13, 2006 1:34 pm
Location: Acworth, GA
Contact:

Re: Banksia GUI released

Post by AdminX » Fri Jan 24, 2020 3:31 pm

AdminX wrote:
Fri Jan 24, 2020 2: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: 865
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia GUI released

Post by phhnguyen » Sun Jan 26, 2020 1:55 pm

AdminX wrote:
Fri Jan 24, 2020 2: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
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

noobpwnftw
Posts: 435
Joined: Sun Nov 08, 2015 10:10 pm

Re: Banksia GUI released

Post by noobpwnftw » Sun Jan 26, 2020 2: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".

User avatar
phhnguyen
Posts: 865
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia GUI released

Post by phhnguyen » Sun Jan 26, 2020 2:37 pm

noobpwnftw wrote:
Sun Jan 26, 2020 2: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
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

noobpwnftw
Posts: 435
Joined: Sun Nov 08, 2015 10:10 pm

Re: Banksia GUI released

Post by noobpwnftw » Sun Jan 26, 2020 2: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.

User avatar
phhnguyen
Posts: 865
Joined: Wed Apr 21, 2010 2:58 am
Location: Australia
Full name: Nguyen Hong Pham
Contact:

Re: Banksia GUI released

Post by phhnguyen » Sun Jan 26, 2020 3:18 pm

noobpwnftw wrote:
Sun Jan 26, 2020 2: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
A freeware chess GUI, based on opensource Banksia - the chess tournament manager

User avatar
AdminX
Posts: 5567
Joined: Mon Mar 13, 2006 1:34 pm
Location: Acworth, GA
Contact:

Re: Banksia GUI released

Post by AdminX » Sun Jan 26, 2020 6:20 pm

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

Post Reply