小编Pra*_*mar的帖子

Wand Policy Error:error/construct.c/ReadImage/412

我在使用Wand将pdf转换为图像时遇到了这个问题:

E           wand.exceptions.PolicyError: not authorized `/opt/sample.pdf' @ error/constitute.c/ReadImage/412
Run Code Online (Sandbox Code Playgroud)

我已经访问过此前的堆栈溢出问题: 转换:未授权`aaaa` @ error/construct.c/ReadImage/453

这是我的代码

def build_image(self, pdf_path, img_path):
    with wand.image.Image(filename=pdf_path) as img:
        img.save(filename=img_path)
Run Code Online (Sandbox Code Playgroud)

我的代码在过去6个月内处于工作状态.现在为什么我得到错误.

请帮忙.

python-3.x wand

11
推荐指数
1
解决办法
6694
查看次数

由于 update-notifier-common,子进程 /usr/bin/dpkg 返回错误代码 (1)

在运行 apt Upgrade 命令时,我得到了。

update-initramfs: Generating /boot/initrd.img-4.4.0-135-generic
    Errors were encountered while processing:
     update-notifier-common
     update-notifier
    E: Sub-process /usr/bin/dpkg returned an error code (1)


root@demo:~# apt install nano
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nano is already the newest version (2.5.3-2ubuntu2).
nano set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do …
Run Code Online (Sandbox Code Playgroud)

ubuntu ubuntu-16.04

2
推荐指数
1
解决办法
3402
查看次数

使用nltk从文本中提取操作/任务

嗨我第一次使用nltk,我想使用nltk从文本中提取动作/任务

Hi prakash, how are you ?. We need to complete the speech to action by 8 June  then you will have to finish the UI by 15 july
Run Code Online (Sandbox Code Playgroud)

在这里,演讲与行动UI 是行动.

我已经开始创建令牌,不知道下一步该做什么,请指导.

from nltk import sent_tokenize
sample_text ="""Hi prakash, how are you ?. We need to complete the speech to action demo by 8 June  then you will have to finish the Ui by 15 july"""
sentences = sent_tokenize(sample_text)
print(sentences)    import nltk
from nltk.tag import pos_tag
from …
Run Code Online (Sandbox Code Playgroud)

python machine-learning nltk

-4
推荐指数
1
解决办法
270
查看次数