获取Python错误“from:无法读取/ var / mail / Bio”(Getting Python error “from: can't read /var/mail/Bio”)
我正在运行(生物)python脚本,导致以下错误:
from: can't read /var/mail/Bio
看到我的脚本没有任何东西与邮件,我不明白为什么我的脚本看/ var / mail。
这里似乎是什么问题? 我怀疑这将有助于脚本似乎不是问题,但这是我的脚本无论如何:
from Bio import SeqIO from Bio.SeqUtils import ProtParam handle = open("examplefasta.fasta") for record in SeqIO.parse(handle, "fasta"): seq = str(record.seq) X = ProtParam.ProteinAnalysis(seq) print X.count_amino_acids() print X.get_amino_acids_percent() print X.molecular_weight() print X.aromaticity() print X.instability_index() print X.flexibility() print X.isoelectric_point() print X.secondary_structure_fraction()
这里有什么问题? 不好的python设置? 我真的不认为这是脚本。
I am running a (bio)python script which results in the following error:
from: can't read /var/mail/Bio
seeing as my script doesn't have anything to with mail, I don't understand why my script is looking in /var/mail.
What seems to be the problem here? i doubt it will help as the script doesn't seem to be the problem, but here's my script anyway:
from Bio import SeqIO from Bio.SeqUtils import ProtParam handle = open("examplefasta.fasta") for record in SeqIO.parse(handle, "fasta"): seq = str(record.seq) X = ProtParam.ProteinAnalysis(seq) print X.count_amino_acids() print X.get_amino_acids_percent() print X.molecular_weight() print X.aromaticity() print X.instability_index() print X.flexibility() print X.isoelectric_point() print X.secondary_structure_fraction()
what is the problem here? bad python setup? I really don't think it's the script.
原文:https://stackoverflow.com/questions/16069816
最满意答案
我相信pdf_info.ps(gs / toolbin)会告诉你这个。 Ghostscript希望事先知道页面是否使用透明度,因为如果它知道没有透明度,它可以对性能和内存进行优化。
请注意,浮动的大量PDF文件声明“虚假”透明度,透明度变为100%不透明:-(
I believe pdf_info.ps (gs/toolbin) will tell you this. Ghostscript wants to know in advance if a page uses transparency or not because it can do optimisations for performance and memory if it knows there is no transparency.
Note that a large number of PDF files floating about declare 'spurious' transparency where the transparency turns out to be 100% opaque :-(
相关问答
更多-
Ghostscript剪辑pdf文件(Ghostscript clips a pdf file)[2022-11-20]
好吧,首先,你设置的许多开关都没有效果: -empty不是一个Ghostscript理解的开关,我有点惊讶它不会导致错误。 -dPDFSETTINGS仅影响pdfwrite设备,这就是它在向量设备部分中记录的原因。 -dCompatabilityLevel仅影响pdfwrite设备的输出。 -dNOSAFER没有任何效果,因为这是默认设置。 -f用于'关闭'以-c开头的直接PostScript插入,如果你不使用-c你不需要-f 现在几乎可以肯定Ghostscript和你的PDF都没有“边距差”,你问题的最可 ... -
使用ghostscript检查PDF是否具有透明对象(Check with ghostscript whether a PDF has transparent objects)[2023-11-11]
我相信pdf_info.ps(gs / toolbin)会告诉你这个。 Ghostscript希望事先知道页面是否使用透明度,因为如果它知道没有透明度,它可以对性能和内存进行优化。 请注意,浮动的大量PDF文件声明“虚假”透明度,透明度变为100%不透明:-( I believe pdf_info.ps (gs/toolbin) will tell you this. Ghostscript wants to know in advance if a page uses transparency or no ... -
GhostScript和PDF / A?(GhostScript and PDF/A?)[2022-08-04]
你的问题没有太多的信息来帮助你制定答案。 已知的Ghostscript的当前版本可以创建PDF / A文件,并使用一系列PDF / A验证工具进行验证。 也就是说,这些工具差别很大,偶尔会出现一个新的工具,用来检查之前没有的工具,并且这个工具会得到修复。 你不会说你正在使用什么版本的Ghostscript,命令行调用(这对PDF / A代是绝对必要的)或操作系统,也不会告诉我们你正在生成的PDF / A文件有什么问题。 您是否阅读过Ghostscript提供的关于如何生成PDF / A的文档? 在Ghost ... -
Ghostscript中的pdfwrite设备实际上不支持图层,因此您无法使用它。 还不清楚为什么你认为图层会有所帮助。 TIFF不是PostScript(或PDF)的一部分,因此您无法直接将TIFF文件读入GS。 我在其他地方发布了一个PostScript程序,它读取TIFF文件并将它们呈现为输出。 您可以使用它来读取TIFF文件。 但是,您必须弄乱PDF解释器或自定义EndPage过程才能读取和呈现TIFF文件。 除非你采取特定的行动,否则它将是不透明的,这可能不是你想要的。 Ghostscript P ...
-
如果没有看到你的实际$psinput ,很难给出明确的建议。 您的$ psinput,通过stdin到Ghostscript,可能包含多个PS文件...您是否尝试过使用其中一个选项 -dOrient1=true -dOrient1=false 在你的命令行? 此外,它看起来像你应该把你的90旋转0 -595转换命令放在带-c的引号内,然后将输入( -f - )定位到处理的最后,如下所示: -c "<> setpagedevice 90 rotate 0 -595 transl ...
-
与Acrobat一样,Ghostscript试图忽略PDF文件中的错误。 为什么? 因为如果我们不向人们发送他们糟糕的PDF文件,并说“但是Acrobat可以打开它”..... 如果指定-dPDFSTOPONERROR,那么Ghostscript将在大型(但并非详尽无遗)的PDF文件范围内抛出错误。 请注意,Ghostscript退出代码通常不会告诉您是否发生了PostScript(或实际上是PDF)错误,解释器会在后台通道上告诉您。 Ghostscript退出代码通常只会告诉您何时解释器发生灾难性事件(例 ...
-
使用GhostScript打印PDF(Print PDF using GhostScript)[2023-02-19]
我想你以前问了这个问题,从你的代码示例中也很清楚你使用的是GSView ,而不是Ghostscript 。 现在,虽然GSView确实使用Ghostscript来完成繁重的工作,但是您无法区分这两个应用程序。 您仍然没有提供要查看的示例PDF文件,也没有提供命令行,尽管您现在至少设法引用了Ghostscript版本。 您还需要提供一个命令行(不是我不准备通过阅读您的代码来组装它),您应该从命令行尝试这个,而不是在您自己的应用程序中,以显示它不是您的应用程序错误。 您应该考虑将Ghostscript升级到当前 ... -
MemoryStream(pdf)到Ghostscript到MemoryStream(jpg)(MemoryStream (pdf) to Ghostscript to MemoryStream (jpg))[2023-01-10]
问题在于,与PostScript语言不同,PDF语言固有地需要随机访问文件。 如果直接向标准输入或PIPE提供PDF,Ghostscript会在解释PDF之前将其复制到临时文件中。 因此,没有必要将PDF作为MemoryStream(或字节数组)传递,因为它在解释之前最终会在磁盘上结束。 看一下Ghostscript.NET和它的GhostscriptRasterizer样本,用于'内存中'输出。 The thing is that the PDF language, unlike the PostScri ... -
不,ghostscript(更具体地说是pdfwrite设备)不会替换图像XObjects或内联图像,它不会测试它们以查看tehy是否相同。 有可能这样做,但它意味着检查每个图像的每个字节,这在性能上可能非常昂贵,所以我们现在不这样做。 如果您想要修改源代码,我可以提供一些建议。 FWIW许多其他对象都经过重复测试,但不测试图像,仅仅是因为读取和散列大图像所花费的时间。 No, ghostscript (more specifically the pdfwrite device) won't replace ...
-
如果我是你,我将首先使用命令shell并从命令行运行Ghostscript。 如果这不起作用,那么我们可以更进一步,但目前你基本上是在同时寻求2个不同组件的帮助,Ghostscript和Ghostscript.NET C#包装器。 理想情况下,您需要找出问题所在的位置,如果它在命令shell中运行,那么它与Ghostscript.NET有关。 如果没有,那么它与Ghostscript有关。 请注意,尾随'-f'可能是问题的一部分。 你不需要那个,除非你: a)使用-c开关引入PostScript,b)打算用 ...