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
unittest automatically triggered during building #8010
Comments
Can't reproduce this in a clean environment with just PyInstaller, LaoNLP and openpyxl installed but I do notice that LaoNLP have accidentally packaged their test suite. (env) /e/n/p/8010> pip download LaoNLP
(env) /e/n/p/8010> unzip -l LaoNLP-1.1.2-py3-none-any.whl
Archive: LaoNLP-1.1.2-py3-none-any.whl
Length Date Time Name
--------- ---------- ----- ----
1680 2023-09-23 19:04 laonlp/__init__.py
1356 2023-09-23 19:04 laonlp/corpus/LICENSE-lao-eng-dictionary
205310 2023-09-23 19:04 laonlp/corpus/Lao-Dictionary.txt
940 2023-09-23 19:04 laonlp/corpus/__init__.py
737 2023-09-23 19:04 laonlp/corpus/core.py
2857765 2023-09-23 19:04 laonlp/corpus/lao-eng-dictionary.csv
379 2023-09-23 19:04 laonlp/corpus/lao-wannaphong.txt
2353 2023-09-23 19:04 laonlp/corpus/lao_words.py
409234 2023-09-23 19:04 laonlp/corpus/lo_spellcheck_dict.txt
1486 2023-09-23 19:04 laonlp/corpus/mopt_dict.py
3743688 2023-09-23 19:04 laonlp/corpus/ptagger_SeqLabeling_corpus.json
5077288 2023-09-23 19:04 laonlp/corpus/ptagger_Yunshan-Cup_corpus.json
1783 2023-09-23 19:04 laonlp/corpus/stopwords_lao.txt
270905 2023-09-23 19:04 laonlp/corpus/wiktionary-20210720.txt
675 2023-09-23 19:04 laonlp/tag/__init__.py
1956 2023-09-23 19:04 laonlp/tag/pos_tag.py
1308 2023-09-23 19:04 laonlp/tokenize/__init__.py
1061 2023-09-23 19:04 laonlp/translate/__init__.py
1085 2023-09-23 19:04 laonlp/translate/mopt_dict.py
8469 2023-09-23 19:04 laonlp/transliterate/__init__.py
864 2023-09-23 19:04 laonlp/util/__init__.py
1750 2023-09-23 19:04 laonlp/util/digitconv.py
925 2023-09-23 19:04 laonlp/util/lao.py
686 2023-09-23 19:04 laonlp/word_vector/__init__.py
3229 2023-09-23 19:04 laonlp/word_vector/word2vec.py
226 2023-09-23 19:04 tests/__init__.py
561 2023-09-23 19:04 tests/test_tag.py
597 2023-09-23 19:04 tests/test_tokenize.py
231 2023-09-23 19:04 tests/test_translate.py
549 2023-09-23 19:04 tests/test_transliterate.py
609 2023-09-23 19:04 tests/test_util.py
374 2023-09-23 19:04 tests/test_word_vector.py
11357 2023-09-23 19:04 LaoNLP-1.1.2.dist-info/LICENSE
3926 2023-09-23 19:04 LaoNLP-1.1.2.dist-info/METADATA
92 2023-09-23 19:04 LaoNLP-1.1.2.dist-info/WHEEL
13 2023-09-23 19:04 LaoNLP-1.1.2.dist-info/top_level.txt
3090 2023-09-23 19:04 LaoNLP-1.1.2.dist-info/RECORD
--------- -------
12618537 37 files That still shouldn't have affected PyInstaller though... |
I set up a clean environment with only the latest version of PyInstaller: 6.1.0
test.py:
|
Looks like this import confuses modulegraph into collection of the Seems that the bug can be triggered by either As a quick work-around, you can use |
It's always nice when suspicious code blocks are already marked as such by our predecessors... pyinstaller/PyInstaller/lib/modulegraph/modulegraph.py Lines 1514 to 1525 in 3ff53a8
Guess it's time we add that |
Description of the issue
unittest
is mysteriously triggered during building, though it does not affect the (successful) building process.This behavior is quite weird since neither
unittest
norlaonlp
is actually imported or used in the minimal script. To reproduce this issue, besidesopenpyxl
,LaoNLP
should also be installed (via pip), since the triggered tests belong toLaoNLP
.Context information (for bug reports)
Output of
pyinstaller --version
:6.0.0
Version of Python: 3.10.13
Platform: Windows 11 x64
How you installed Python: python.org/downloads
Did you also try this on another platform? Does it work there?
try the latest development version, using the following command:
(https://github.com/pyinstaller/pyinstaller/wiki/If-Things-Go-Wrong) and
Make sure everything is packaged correctly
--noupx
or setupx=False
in your .spec-file--debug
topyi-makespec
orpyinstaller
or useEXE(..., debug=1, ...)
in your .spec file.A minimal example program which shows the error
Stacktrace / full error message
The text was updated successfully, but these errors were encountered: