Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build is missing files and does not run #22

Open
Kromtar opened this issue Mar 1, 2023 · 3 comments
Open

Build is missing files and does not run #22

Kromtar opened this issue Mar 1, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Kromtar
Copy link

Kromtar commented Mar 1, 2023

Running "pyinstaller main.spec" creates a build that is not functional. It fails to run. When compared to the downloadable build, many dll's and some folders are missing.

What are the specific steps to be able to make a build?

@blueaxis
Copy link
Owner

blueaxis commented Mar 2, 2023

Can you post the errors you're getting?

@Kromtar
Copy link
Author

Kromtar commented Mar 2, 2023

When I run the cloe.exe generated in the build>dist>app folder a "Unhadled exception in script" window appears notifying me:

File "transformers/utils/logging.py", in line 88, in _configure_library_root_logger
AttributeError: 'NoneType' object has not attribute 'flush'

If I make a new build with the option console=True in the EXE function of main.spec, The terminal displays these messages:

None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
2023-03-02 09:24:04.729 | INFO     | manga_ocr.ocr:__init__:13 - Loading OCR model from kha-white/manga-ocr-base
transformers\models\vit\feature_extraction_vit.py:28: FutureWarning: The class ViTFeatureExtractor is deprecated and will be removed in version 5 of Transformers. Please use ViTImageProcessor instead.

PyTorch resources are not remaining in the build?

Additionally, when this happens, in windows I see two notifications:

  1. Loading the MangaOCR mode...
  2. Load Model Error: VisionEncoderDecoderModel requires the PyTorch library but it was not found in your environment. Check the intruction on the...

I have the suspicion that the build is not "packaging" all the resources of the project.

These are the libraries installed in the Poetry environment:

altgraph                  0.17.3     Python graph (network) package
black                     22.12.0    The uncompromising code formatter.
certifi                   2022.12.7  Python package for providing Mozilla's CA Bundle.
charset-normalizer        3.0.1      The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.
click                     8.1.3      Composable command line interface toolkit
colorama                  0.4.6      Cross-platform colored terminal text.
filelock                  3.9.0      A platform independent file lock.
fire                      0.5.0      A library for automatically generating command line interfaces.
fugashi                   1.2.1      A Cython MeCab wrapper for fast, pythonic Japanese tokenization.
huggingface-hub           0.7.0      Client library to download and publish models on the huggingface.co hub
idna                      3.4        Internationalized Domain Names in Applications (IDNA)
jaconv                    0.3.4      Pure-Python Japanese character interconverter for Hiragana, Katakana, Hankaku, Zenkaku and more
loguru                    0.6.0      Python logging made (stupidly) simple
manga-ocr                 0.1.8      OCR for Japanese manga
mypy-extensions           1.0.0      Type system extensions for programs checked with the mypy type checker.
numpy                     1.24.2     Fundamental package for array computing in Python
packaging                 23.0       Core utilities for Python packages
pathspec                  0.11.0     Utility library for gitignore style pattern matching of file paths.
pefile                    2023.2.7   Python PE parsing module
pillow                    9.4.0      Python Imaging Library (Fork)
platformdirs              3.0.0      A small Python package for determining appropriate platform-specific dirs, e.g. a "user data dir".
pyinstaller               5.8.0      PyInstaller bundles a Python application and all its dependencies into a single package.
pyinstaller-hooks-contrib 2023.0     Community maintained hooks for PyInstaller
pynput                    1.7.6      Monitor and control user input devices
pyperclip                 1.8.2      A cross-platform clipboard module for Python. (Only handles plain text for now.)
pyqt5                     5.15.9     Python bindings for the Qt cross platform application toolkit
pyqt5-qt5                 5.15.2     The subset of a Qt installation needed by PyQt5.
pyqt5-sip                 12.11.1    The sip module support for PyQt5
pywin32-ctypes            0.2.0
pyyaml                    6.0        YAML parser and emitter for Python
regex                     2022.10.31 Alternative regular expression module, to replace re.
requests                  2.28.2     Python HTTP for Humans.
sentencepiece             0.1.97     SentencePiece python wrapper
six                       1.16.0     Python 2 and 3 compatibility utilities
termcolor                 2.2.0      ANSI color formatting for output in terminal
tokenizers                0.12.1     Fast and Customizable Tokenizers
tomli                     2.0.1      A lil' TOML parser
torch                     1.13.1     Tensors and Dynamic neural networks in Python with strong GPU acceleration
tqdm                      4.64.1     Fast, Extensible Progress Meter
transformers              4.21.3     State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow
typing-extensions         4.5.0      Backported and Experimental Type Hints for Python 3.7+
unidic-lite               1.0.8      A small version of UniDic packaged for Python
urllib3                   1.26.14    HTTP library with thread-safe connection pooling, file post, and more.
win32-setctime            1.1.0      A small Python utility to set file creation time on Windows

Thank you

@blueaxis
Copy link
Owner

blueaxis commented Mar 5, 2023

I just realized I'm using different environments for development and build. The issue is probably caused by using an updated package version. Will try to release a fix next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants