Giter Club home page Giter Club logo

tex2img's Issues

Failed to Build

Hello, I am having trouble building this module

Information of my environment:

OS: Windows 7 64bit SP1
Python Version: 3.8.5
PIP Version: 20.3.3
Microsoft Visual C++ Version: 15.0

Error log:

    running install
    running build
    running build_ext
    building 'tex2img' extension
    creating build
    creating build\temp.win32-3.8
    creating build\temp.win32-3.8\Release
    creating build\temp.win32-3.8\Release\src
    creating build\temp.win32-3.8\Release\src\basisu
    creating build\temp.win32-3.8\Release\src\basisu\transcoder
    creating build\temp.win32-3.8\Release\src\etcpack
    creating build\temp.win32-3.8\Release\src\pvrtc_decoder
    E:\Microsoft Visual Studio\VC\Tools\MSVC\14.28.29333\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\python\include -Id:\python\include "-IE:\Microsoft Visual Studio\VC\Tools\MSVC\14.28.29333\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /EHsc /Tpsrc\main.cpp /Fobuild\temp.win32-3.8\Release\src\main.obj -std=c++11
    cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
    main.cpp
    C:\Users\User\AppData\Local\Temp\pip-install-e30erjpj\tex2img_836879c5d2fc4641b8a8f99a7ea1cd78\src\basisu\basisu_enc.h(689): error C3861: 'tolower': identifier not found
    src\main.cpp(58): warning C4018: '>=': signed/unsigned mismatch
    src\main.cpp(77): warning C4018: '<': signed/unsigned mismatch
    src\main.cpp(78): warning C4018: '<': signed/unsigned mismatch
    src\main.cpp(114): warning C4018: '>=': signed/unsigned mismatch
    src\main.cpp(119): warning C4018: '>=': signed/unsigned mismatch
    error: command 'E:\\Microsoft Visual Studio\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

Step to reproduce:

  1. Open Command Prompt
  2. Type pip install tex2img

Throw exception instead of silent fail

printf("failed decoding");

On the above referenced line, this would be better to throw an exception like raise ValueError('Failed decoding') instead of printf(). This helps anyone using the library in detecting errors. If you anticipate that users may need the script to still move on and continue processing, perhaps add a boolean argument to the function like ignore_errors=False

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.