GithubHelp home page GithubHelp logo

Comments (11)

olleeriksson avatar olleeriksson commented on June 4, 2024 1

Thanks by the way for the kind words IndeedLad. I hope this fix works for you.

from listudy.

ArneVogel avatar ArneVogel commented on June 4, 2024

Can you try importing again? It worked just fine for me.

from listudy.

olleeriksson avatar olleeriksson commented on June 4, 2024

Worked for me too..

from listudy.

IndeedLad avatar IndeedLad commented on June 4, 2024

I changed web browser from Chrome 108.0.5359.96 64 bit to native Edge and it worked. Weird stuff only this study had that issue.

from listudy.

IndeedLad avatar IndeedLad commented on June 4, 2024

This was a temporary solution. Today I wanted to upload this study: https://lichess.org/study/tgaKM6YZ, looks the same in every browser that I tested Chrome, Firefox, Edge and Opera.

On listudy https://listudy.org/en/studies/sokck1-test :
it looks like that with no chapters to select from drop down list and with small chessboard and clear visual bugs
image

Here is a pgn of that study exported from lichess
lichess_study_main-white-repertoire-1-e4-1_by_KurKucy_2023.01.08.txt

Edit: This is such a weird behavior sometimes it works sometime it's not different studies work on different browsers.

from listudy.

IndeedLad avatar IndeedLad commented on June 4, 2024

Out of curiosity I checked the scripts source code:

line: 8128 n = Math.min(n, trees.length - 1),

function() {
            var e = study_id + "_selected"
              , t = document.getElementById("chapter_select")
              , n = parseInt(localStorage.getItem(e) || 0);
            n = Math.min(n, trees.length - 1),
            window.chapter = n;
            for (var r = 0; r < trees.length; ++r) {
                var u = document.createElement("option");
                u.value = r;
                var o = je(r);
                u.innerText = o,
                r == n && (u.selected = !0),
                t.appendChild(u)
            }

Here I get an error
Uncaught TypeError: Cannot read properties of null (reading 'length')

I am not proficient in js at all so it is hard for me to tell why this is not working but maybe this will shed some light on the issue

from listudy.

olleeriksson avatar olleeriksson commented on June 4, 2024

Before getting that message I also get "DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'pq9q1f_tree' exceeded the quota."

Your file is 487 Kb which is larger than anything I've tried, so we're probably running into some kind of limitation on the amount of stuff you can store in the browser's localstorage.

image

Now, it might be a limitation on the size of the PGN file, or it could be a limitation on total storage per website domain. So it's possible that you have already uploaded enough pgn files, and all of them have added to the amount of data stored. I am not sure if the localstorage data is cleared after you delete a study, I don't think it is. So deleting some studies won't help then.

What you could do in an attempt to get it working is look into clearing the localstorage of listudy.org, or just the keys ending with _tree. In chrome you open the developer tools (F12), then go to the Application tab, and here you can search for anything that ends with _tree (see screenshot below). Hitting Delete on the keyboard deletes these. But, when you do that the uploaded study in question breaks, so you then have to delete it and upload it again, or possibly just upload the PGN file to it again. Now, this will only fix the problem is the problem is the total storage limit. If the problem is in the size of the repertoire I am afraid that's going to require looking into storing the data for each study more efficiently, if it's at all possible.

image

from listudy.

IndeedLad avatar IndeedLad commented on June 4, 2024

Now, it might be a limitation on the size of the PGN file, or it could be a limitation on total storage per website domain. So it's possible that you have already uploaded enough pgn files, and all of them have added to the amount of data stored. I am not sure if the localstorage data is cleared after you delete a study, I don't think it is. So deleting some studies won't help then.

Yes, all previous uploaded studies were in local storage, I flushed them.

What you could do in an attempt to get it working is look into clearing the localstorage of listudy.org, or just the keys ending with _tree. In chrome you open the developer tools (F12), then go to the Application tab, and here you can search for anything that ends with _tree (see screenshot below). Hitting Delete on the keyboard deletes these. But, when you do that the uploaded study in question breaks, so you then have to delete it and upload it again, or possibly just upload the PGN file to it again. Now, this will only fix the problem is the problem is the total storage limit. If the problem is in the size of the repertoire I am afraid that's going to require looking into storing the data for each study more efficiently, if it's at all possible.

After flushing I tried to upload the first part of repertoire. It worked! Then after same steps (deleting study and local storage memories) uploading this study which is a whole white repertoire https://lichess.org/study/tgaKM6YZ, aprox 900 kB. Now it's not working. I guess the possible work around is to stick to smaller chunks of studies. Kudos to you for such elaborated answer and contribution to this project. You are awesome!

from listudy.

olleeriksson avatar olleeriksson commented on June 4, 2024

I think I may have some idea how we can get around this. Maybe we can just skip storing the tree in localstorage if we run into limit problems. I think it's only meant to speed up the loading. I made some modifications to some source lines and it seems to run ok.

But I need some time to look into this. And see what Arne thinks.

from listudy.

IndeedLad avatar IndeedLad commented on June 4, 2024

I see, the idea behind my project is to make automatic comprehensive full repertoire studies this means that studies are going to be big. I was looking for a platform to share and learn these studies. Listudy seems to be the best option out there.

from listudy.

olleeriksson avatar olleeriksson commented on June 4, 2024

from listudy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.