当前位置:首页 » 《关注互联网》 » 正文

Python报错:PermissionError: [Errno 13] Permission denied_Cam_韦的博客

4 人参与  2021年09月06日 07:43  分类 : 《关注互联网》  评论

点击全文阅读


一、问题现象:执行ITS脚本,有的正常有的出问题。出问题的提示

    with open(CACHE_FILENAME, "w") as f:
IOError: [Errno 13] Permission denied: 'its.target.cfg'

    filename_or_obj = open(filename_or_obj, 'wb')
IOError: [Errno 13] Permission denied: 'test_dng_noise_model_plot.png'

test@test:/usr/local/android-cts-verifier/CameraITS$ python tests/scene1_2/test_yuv_jpeg_all.py camera=0
Measuring target exposure
Running vendor 3A on device
Capturing 1 frame with 1 format [yuv]
Setting cached target exposure
Traceback (most recent call last):
  File "tests/scene1_2/test_yuv_jpeg_all.py", line 102, in <module>
    main()
  File "tests/scene1_2/test_yuv_jpeg_all.py", line 42, in main
    e, s = its.target.get_target_exposure_combos(cam)["midExposureTime"]
  File "/usr/local/android-cts-verifier/CameraITS/pymodules/its/target.py", line 196, in get_target_exposure_combos
    exposure = get_target_exposure(its_session)
  File "/usr/local/android-cts-verifier/CameraITS/pymodules/its/target.py", line 164, in get_target_exposure
    __set_cached_target_exposure(measured_exposure)
  File "/usr/local/android-cts-verifier/CameraITS/pymodules/its/target.py", line 100, in __set_cached_target_exposure
    with open(CACHE_FILENAME, "w") as f:
IOError: [Errno 13] Permission denied: 'its.target.cfg'
test@test:/usr/local/android-cts-verifier/CameraITS$ python tests/scene1_1/test_dng_noise_model.py camera=0
Running vendor 3A on device
Capturing 1 frame with 1 format [raw]
部分略

Traceback (most recent call last):
  File "tests/scene1_1/test_dng_noise_model.py", line 151, in <module>
    main()
  File "tests/scene1_1/test_dng_noise_model.py", line 139, in main
    matplotlib.pyplot.savefig('%s_plot.png' % NAME)
  File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 701, in savefig
    res = fig.savefig(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/figure.py", line 1834, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/backend_bases.py", line 2267, in print_figure
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 512, in print_png
    filename_or_obj = open(filename_or_obj, 'wb')
IOError: [Errno 13] Permission denied: 'test_dng_noise_model_plot.png'

  有的也正常

test@test:/usr/local/android-cts-verifier/CameraITS$ python tests/scene1_1/test_3a.py camera=0
Running vendor 3A on device
AE: sensitivity 870, exposure 19ms
AWB: gains [1.121094, 1.0, 1.0, 2.546875] transform [1.753906, -0.773438, 0.017578, -0.416016, 1.533203, -0.117188, -0.310547, -0.853516, 2.164063]
AF: distance 5.468337

这块的问题是ubuntu19环境有问题,换上ubuntu18就可以。


点击全文阅读


本文链接:http://zhangshiyu.com/post/27090.html

<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1