IOError on Python 2.7 / No such directory __pycache__/
まだ誰も着手していません。
評価
調査の方向性
snappy_cffi.py の cffi verify 呼び出し付近から始め、issue で参照されている cffi API および verifier.py の traceback と比較してください。root 権限なしでの Python 2.7 のインストールケースを再現してください。pycache がまだ存在しない場合でも snappy のインポートが失敗しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
I try to use snappy which use cffi with a non-root user that can't create the pycache/ dir.
I got :
STDERR: Traceback (most recent call last):
File "/opt/graphite/pypy/bin/django-admin", line 11, in <module>
sys.exit(execute_from_command_line())
File "/opt/graphite/pypy/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/opt/graphite/pypy/site-packages/django/core/management/__init__.py", line 302, in execute
settings.INSTALLED_APPS
File "/opt/graphite/pypy/site-packages/django/conf/__init__.py", line 55, in __getattr__
self._setup(name)
File "/opt/graphite/pypy/site-packages/django/conf/__init__.py", line 43, in _setup
self._wrapped = Settings(settings_module)
File "/opt/graphite/pypy/site-packages/django/conf/__init__.py", line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/opt/pypy/pypy-5.7.1-linux_x86_64-portable/lib-python/2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/opt/graphite/webapp/graphite/settings.py", line 160, in <module>
from graphite.local_settings import * # noqa
File "/opt/graphite/webapp/graphite/local_settings.py", line 53, in <module>
from graphite.local_settings_dynamic import *
File "/opt/graphite/webapp/graphite/local_settings_dynamic.py", line 1, in <module>
from biggraphite.plugins import graphite
File "/opt/graphite/pypy/site-packages/biggraphite/plugins/graphite.py", line 30, in <module>
from biggraphite import graphite_utils
File "/opt/graphite/pypy/site-packages/biggraphite/graphite_utils.py", line 17, in <module>
from biggraphite import utils as bg_utils
File "/opt/graphite/pypy/site-packages/biggraphite/utils.py", line 22, in <module>
from biggraphite.drivers import cassandra as bg_cassandra
File "/opt/graphite/pypy/site-packages/biggraphite/drivers/cassandra.py", line 34, in <module>
from cassandra import cluster as c_cluster
File "/opt/graphite/pypy/site-packages/cassandra/cluster.py", line 46, in <module>
from cassandra.connection import (ConnectionException, ConnectionShutdown,
File "/opt/graphite/pypy/site-packages/cassandra/connection.py", line 80, in <module>
import snappy
File "/opt/graphite/pypy/site-packages/snappy.py", line 50, in <module>
from snappy_cffi import UncompressError, compress, decompress, \
File "/opt/graphite/pypy/site-packages/snappy_cffi.py", line 169, in <module>
''', libraries=["snappy"])
File "/opt/pypy/pypy-5.7.1-linux_x86_64-portable/lib_pypy/cffi/api.py", line 438, in verify
lib = self.verifier.load_library()
File "/opt/pypy/pypy-5.7.1-linux_x86_64-portable/lib_pypy/cffi/verifier.py", line 113, in load_library
self._write_source()
File "/opt/pypy/pypy-5.7.1-linux_x86_64-portable/lib_pypy/cffi/verifier.py", line 202, in _write_source
with open(self.sourcefilename, "w") as fp:
IOError: [Errno 2] No such file or directory: '/opt/graphite/pypy/site-packages/__pycache__/_cffi__g762f05ffx6bf5342b.c'
As far as I understand, it calls a deprecated method of cffi (http://cffi.readthedocs.io/en/latest/whatsnew.html?#v1-0-0).
A workaround would be to create pycache/ directory at the installation as root.
- 主要言語
- Python
- スター
- 490
- フォーク
- 104
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
intake/python-snappy のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
intake/python-snappy#152 · コメント 3 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
intake/python-snappy#151 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
intake/python-snappy#150 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
intake/python-snappy#147 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
intake/python-snappy#140 · コメント 1 件 · リアクション 1 件 ·
intake/python-snappy の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·