Giter VIP home page Giter VIP logo

Comments (5)

marcusva avatar marcusva commented on June 11, 2024

Original comment by Marcus von Appen (Bitbucket: marcusva, GitHub: marcusva):


  • Fixed #48: Be noisy on DLL load failures to avoid users fiddling around with
    the warnings parameters.

from py-sdl2.

marcusva avatar marcusva commented on June 11, 2024

Original comment by Mike C (Bitbucket: mikechag, GitHub: Unknown):


I was using 0.8.0 at the time. I just upgraded to 0.9.0 and still just go the error (once I uninstalled SDL_ttf)

I thought it might be the IDE (PyCharm) hiding the warnings, but I ran it in a termal and still only got the error message and no warnings

from py-sdl2.

marcusva avatar marcusva commented on June 11, 2024

Original comment by Marcus von Appen (Bitbucket: marcusva, GitHub: marcusva):


Usually the warning should be printed through the warnings.warn() function call in line 61. Which version of PySDL do you use?

from py-sdl2.

marcusva avatar marcusva commented on June 11, 2024

Original comment by Mike C (Bitbucket: mikechag, GitHub: Unknown):


Both are 64bit.

I was able to determine the issue, and that wasn't it. Both libSDL2 and libSDL2_ttf were installed to /usr/local/lib, which is the default for the configure scripts when built from source. I guess this allowed the dll loader (dll.py) to know that I had it installed, but not where it was installed to.

There were warnings that I was not aware of (I guess maybe there's a switch I need to set to show them?), so I changed the code in DLL.py to print the warning instead, and it gave me:
OSError('libSDL2_ttf-2.0.so.0: cannot open shared object file: No such file or directory',)

That was enough for me to figure out the issue.

So the original issue is all set, and I can chalk that up to me installing from source and/or not having paths correct.

I understand making the library checks warnings, as it could have failures that would get annoying if they show up every time, but maybe after the warning checks, and if it throws a full on error, it shows you all of the warnings in addition to the RuntimeError that's thrown? The exception that's raised, "found %s, but it's not usable for the libary %s", doesn't do much to help troubleshoot the issue in and of itself.

I'm referencing dll.py, lines 50-65

(there's also a typo in the exception; should be library and not libary, but I think that's already been posted as a separate issue)

from py-sdl2.

marcusva avatar marcusva commented on June 11, 2024

Original comment by Marcus von Appen (Bitbucket: marcusva, GitHub: marcusva):


This can happen, if one runs a 32-bit python and uses 64-bit SDL2 libraries (or the other way around). Did you ensure that both, Python and your SDL2 libraries use the same bit count?

from py-sdl2.

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.