SHARE
TWEET

Untitled

a guest Jun 19th, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PermissionError: [Errno 13] Permission denied: '/opt/python/python35/lib/python3.5/site-packages/pykakasi/kanwadict3.db/data'
  2.      
  3. import pykakasi
  4.  
  5. text = u"かな漢字交じり文"
  6. kakasi = pykakasi.kakasi()
  7. kakasi.setMode("H","a") # Hiragana to ascii, default: no conversion
  8. kakasi.setMode("K","a") # Katakana to ascii, default: no conversion
  9. kakasi.setMode("J","a") # Japanese to ascii, default: no conversion
  10. kakasi.setMode("r","Hepburn") # default: use Hepburn Roman table
  11. kakasi.setMode("s", True) # add space, default: no separator
  12. kakasi.setMode("C", True) # capitalize, default: no capitalize
  13. conv = kakasi.getConverter()
  14. result = conv.do(text)
  15. print(result)
  16.      
  17. Traceback (most recent call last):
  18.   File "<stdin>", line 1, in <module>
  19.   File "/opt/python/python35/lib/python3.5/site-packages/pykakasi/kakasi.py", line 99, in getConverter
  20.     self._conv["J"] = J2(self._mode["J"], method=self._option["r"])
  21.   File "/opt/python/python35/lib/python3.5/site-packages/pykakasi/j2.py", line 48, in __init__
  22.     self._kanwa = kanwa()
  23.   File "/opt/python/python35/lib/python3.5/site-packages/pykakasi/kanwa.py", line 32, in __init__
  24.     self._kanwadict = dbm.open(dictpath, 'r')
  25.   File "/opt/python/python35/lib/python3.5/site-packages/semidbm/db.py", line 355, in open
  26.     return _SemiDBMReadOnly(filename, **kwargs)
  27.   File "/opt/python/python35/lib/python3.5/site-packages/semidbm/db.py", line 40, in __init__
  28.     self._load_db()
  29.   File "/opt/python/python35/lib/python3.5/site-packages/semidbm/db.py", line 49, in _load_db
  30.     self._data_fd = os.open(self._data_filename, compat.DATA_OPEN_FLAGS)
  31. PermissionError: [Errno 13] Permission denied: '/opt/python/python35/lib/python3.5/site-packages/pykakasi/kanwadict3.db/data'
  32.      
  33. # code.py
  34. import sys
  35. sys.path.insert(0, '/package/')
  36.  
  37. import myDesiredPackage
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top