Cannot find import with underscore "_functools"
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, python
- Lĩnh vực
- compilers
Hướng nghiên cứu
Start by reproducing the reported transcrypt -b -v Run_AFPO.py command and trace the import chain from Run_AFPO.py through copy.py, types.py, and functools.py line 17. Determine how the _functools import should be handled in Transcrypt, then verify that the example compiles without the reported missing-module error.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hello - I am just getting started with Transcrypt. The automated tests all run without errors and I have a trivial example from your docs working great.
Im running into an issue importing functools in the native Python 3.6 library. Could you point me in the right direction? Here is the Terminal output (Im on a Mac if that helps at all).
`
(env) ip0af5059f:Transcrypt-DemoOne RachelDotey$ transcrypt -b -v Run_AFPO.py
Transcrypt (TM) Python to JavaScript Small Sane Subset Transpiler Version 3.6.101
Copyright (C) Geatec Engineering. License: Apache 2.0
Extracting module properties from: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/javascript/core.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/base.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/javascript/base.mod.js
Extracting module properties from: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/javascript/base.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/standard.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/javascript/standard.mod.js
Extracting module properties from: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/javascript/standard.mod.js
Extracting module properties from: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/org/transcrypt/javascript/builtin.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/Run_AFPO.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/javascript/Run_AFPO.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/MaxOnes_AFPO.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/javascript/MaxOnes_AFPO.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/copy.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/javascript/copy.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/types.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/javascript/types.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/sys/init.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/sys/javascript/init.mod.js
Extracting module properties from: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/sys/javascript/init.mod.js
Parsing module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/functools.py
Generating code for module: /Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/javascript/functools.mod.js
Error while compiling (offending file last):
File '/Applications/MAMP/htdocs/Transcrypt-DemoOne/Run_AFPO.py', line 6, at import of:
File '/Applications/MAMP/htdocs/Transcrypt-DemoOne/MaxOnes_AFPO.py', line 6, at import of:
File '/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/copy.py', line 51, at import of:
File '/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/types.py', line 171, at import of:
File '/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/functools.py', line 17, namely:
Attempt to import module: _functools
Can't find any of:
/Applications/MAMP/htdocs/Transcrypt-DemoOne/_functools.py
/Applications/MAMP/htdocs/Transcrypt-DemoOne/__javascript__/_functools.mod.js
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/_functools.py
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/transcrypt/modules/__javascript__/_functools.mod.js
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/bin/_functools.py
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/bin/__javascript__/_functools.mod.js
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python36.zip/_functools.py
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python36.zip/__javascript__/_functools.mod.js
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/_functools.py
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/__javascript__/_functools.mod.js
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/lib-dynload/_functools.py
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/lib-dynload/__javascript__/_functools.mod.js
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/_functools.py
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/__javascript__/_functools.mod.js
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/_functools.py
/Applications/MAMP/htdocs/Transcrypt-DemoOne/env/lib/python3.6/site-packages/__javascript__/_functools.mod.js
Aborted
`
Heres the code stack:
Run_AFPO.py line 6
from MaxOnes_AFPO import AFPO
MaxOnes_AFPO.py line 6
import copy
copy.py line 51
import types
types.py line 171
import functools as _functools
The offending line in functools.py is line 17
from _functools import reduce
- Ngôn ngữ chính
- Python
- Star
- 2.9k
- Fork
- 218
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TranscryptOrg/Transcrypt
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
TranscryptOrg/Transcrypt#913 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
TranscryptOrg/Transcrypt#911 · 2 bình luận ·
-
IS: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
TranscryptOrg/Transcrypt#908 ·
-
SUB: documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
TranscryptOrg/Transcrypt#656 · 7 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
TranscryptOrg/Transcrypt#914 ·
Tất cả issue của TranscryptOrg/Transcrypt
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
zostera/django-bootstrap4#894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
zilliztech/memsearch#759 ·