aspose-words / aspose.words-for-python-via-.net Goto Github PK
View Code? Open in Web Editor NEWAspose.Words for Python via .NET examples and showcases
License: MIT License
Aspose.Words for Python via .NET examples and showcases
License: MIT License
I am trying to use the aspose.word inside celery worker. When i try to load a ".doc" file using the below API my worker gets killed:
doc = aw.Document(file_path)
Stacktrace:
async_framework-celery-worker-1 | [2023-06-15 07:34:52,105: ERROR/ForkPoolWorker-2] Chord 'caeb5bc7-7b4c-4542-a032-dc66e7721a87' raised: WorkerLostError('Worker exited prematurely: signal 6 (SIGABRT) Job: 3.')
async_framework-celery-worker-1 | Traceback (most recent call last):
async_framework-celery-worker-1 | File "/usr/local/lib/python3.10/site-packages/celery/app/builtins.py", line 78, in unlock_chord
async_framework-celery-worker-1 | ret = j(
async_framework-celery-worker-1 | File "/usr/local/lib/python3.10/site-packages/celery/result.py", line 746, in join
async_framework-celery-worker-1 | value = result.get(
async_framework-celery-worker-1 | File "/usr/local/lib/python3.10/site-packages/celery/result.py", line 219, in get
async_framework-celery-worker-1 | self.maybe_throw(callback=callback)
async_framework-celery-worker-1 | File "/usr/local/lib/python3.10/site-packages/celery/result.py", line 335, in maybe_throw
async_framework-celery-worker-1 | self.throw(value, self._to_remote_traceback(tb))
async_framework-celery-worker-1 | File "/usr/local/lib/python3.10/site-packages/celery/result.py", line 328, in throw
async_framework-celery-worker-1 | self.on_ready.throw(*args, **kwargs)
async_framework-celery-worker-1 | File "/usr/local/lib/python3.10/site-packages/vine/promises.py", line 234, in throw
async_framework-celery-worker-1 | reraise(type(exc), exc, tb)
async_framework-celery-worker-1 | File "/usr/local/lib/python3.10/site-packages/vine/utils.py", line 30, in reraise
async_framework-celery-worker-1 | raise value
async_framework-celery-worker-1 | billiard.exceptions.WorkerLostError: Worker exited prematurely: signal 6 (SIGABRT) Job: 3.
Versions:
celery = "5.1.2"
aspose-words = "^23.4.0"
If I start the worker with "celery worker --pool solo" option then aspose loads fine but I need to process a lot of data and could not go with solo option.
I have already checked that I have sufficient resources and the doc file i am trying is very small with "4-5 lines" only.
Any help/ pointers would be really appreciated.
I run command pip install aspose-words
on Ubuntu
Result:
ERROR: Could not find a version that satisfies the requirement aspose-words (from versions: none)
ERROR: No matching distribution found for aspose-words
Dear Developers,
Your library seems very promising! I am looking forward to using it.
However, Apsose.words does not seem to work on my M1 macbook (2020).
Could you please make a build for it?
Best regards
Lukas
when i use the online converter provided by you, everything is fine. but when i copy the code to run on my own pc. The generated svg is blank, no content inside of it. Could you please give some tips?
This is the code provided by you:
import aspose.words as aw
doc = aw.Document()
builder = aw.DocumentBuilder(doc)
shape = builder.insert_image("Input.jpg")
shape.image_data.save("Output.svg")
Thank you so much !!
When I try to see the code inside
Unable to obtain correct results using examples from the official website
The code source is here:
https://products.aspose.com/words/zh/python-net/conversion/image-to-svg/#codeSnippetAnchor
Hi, I have had to update my python due to security issues with the old version. However, now aspose-words does not work. Is there a solution for this?
Whether in colab or on the local machine, simply run the demo code,like
import aspose.words as aw
doc = aw.Document("Input.docx")
doc.save("Output.md")
It's crashed quickly
When are you going to add python 3.12 as supported version for aspose-words? I have been waiting 7 months and still no release, which supports python 3.12!
Hey!
Can not install aspose-words via pip:
pip version
23.2.1
Python version
3.10.13
OS
Alpine 3.17
I found that you can't install manylinux wheels on Alpine - pypa/pip#9735 (comment).
hi! aw.digitalsignatures.CertificateHolder.create(MY_DIR + "morzal.pfx", "aw")
on windows system no problem!but complex password can't decrypt on unix like centos, only “aw”!
你好!word文档加密电子签名设置的密码基本在windows系统没问题,但是在类unix系统 如centos7 只能(猜测)使用aw.digitalsignatures.CertificateHolder.create(MY_DIR + "morzal.pfx", "aw")
aw为密码 其它如123456/nihao/nihao123等等都不能用!请问是什么原因?提示RuntimeError: Proxy error(InvalidCastException) or other tips
When I run doc.save the colab always crashes so I wonder if this supports colab too?
import aspose.words as aw
doc = aw.Document("2782884.doc")
for page in range(0, doc.page_count):
extractedPage = doc.extract_pages(page, 1)
extractedPage.save(f"Output_{page + 1}.jpg")
The words in .jpg are missing, no matter pdf or doc. Is the version broken?
Ubuntu 22.04 ships with OpenSSL 3.0. OpenSSL 1.1 is not available as a runtime library.
This produces the following error: No usable version of libssl found
I have tried this package with Django 4.2
its awesome !, however there is some issues:
def download_approval(request, project_id):
project = get_object_or_404(Project, pk=project_id)
doc = DocxTemplate('letter.docx')
context = {
'ref_num': project.ref_num,
'author_name': project.author.get_full_name,
'approval_date': project.approved_date.date(),
'project_title': project.title_en
}
doc.render(context)
file_path = project.ref_num + '_' + 'approval_letter.docx'
full_path = os.path.join(MEDIA_URL, 'approval/') + file_path
doc.save(full_path)
doc_final = aw.Document(full_path)
response = HttpResponse(doc_final.save('research_permission_request.pdf'), content_type='application/pdf')
response['Content-Disposition'] = 'inline; filename=' + os.path.basename(full_path)
return response
I have tried convert a docx to pdf by aspose.words, BUT i CANNOT render the file in the browser, so how could I make the file generated by Aspose downloadable ?
also: is it necessary to add this watermark to the generated pdf file :( also there is a punch of red statements which says its an evaluation copy...
Dad, my friend, how can I delete these ads you posted?
when i install the package(aspose-words) and then run this code:
import aspose.words as aw
ImportError: unable to import module dependencies. Cannot import the aspose.pydrawing module.
I think it is because the version of aspose.pydrawing is low. So i want to upgrade the version of aspose.pydrawing.
But i find that the aspose.pydrawing package can not be updated separately.
import aspose.words as aw
certHolder = aw.digitalsignatures.CertificateHolder.create("morzal.pfx", "aw")
aw.digitalsignatures.DigitalSignatureUtil.sign("t1.docx", "t2.docx", certHolder)
on windows that's ok! but does not on CentOS :
[root@i-jidipjl1 sign_docx]# python3 test.py
Traceback (most recent call last):
File "test.py", line 1, in
import aspose.words as aw
File "/usr/local/python3/lib/python3.7/site-packages/aspose/init.py", line 44, in load_module
native_module = self._load_native_module(native_name)
File "/usr/local/python3/lib/python3.7/site-packages/aspose/init.py", line 76, in _load_native_module
return _load(spec)
ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
on other server docker env,it's :verify error。。。 why?
你好!
在使用Python3.7-python3.9测试对word签名的时候 均出现日期比实际时间later 8小时的情况 请问怎么办?
hi!
when use aspose.words to sign a word ,but sign date incorrect !later 8 hours. Is it a bug? what should I do ? Thanks~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.