Giter VIP home page Giter VIP logo

aspose.words-for-python-via-.net's Issues

Kernel crashed

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

Support for mac

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

No module named 'aspose.words';

Using Python 3.9.19 with pyenv on Intel macOS, but the same happens with 3.10.14. Installed aspose with "pip install aspose-words".
Uninstalled and reinstalled several times, but every time i try to use the code

`import aspose.words as aw

doc = aw.Document("input.doc")

doc.save("output.pdf")`

it doesn't work -> ModuleNotFoundError: No module named 'aspose.words'; 'aspose' is not a package.
Any advice?

Issue with using aspose word with celery worker

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.

convert pdf, doc to jpg, words are missing

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?

Python 3.11.0 not supported

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?

word sign password

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

download the file

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...

Can't import aspose on my Mac

I've already installed aspose-words.

$ pip install aspose-words

Requirement already satisfied: aspose-words in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (24.5.0)

& python is installed on my machine:

$ brew info python
==> [email protected]: stable 3.12.3 (bottled)

Installed
/opt/homebrew/Cellar/[email protected]/3.12.3 (3,296 files, 66.2MB) *

However, I'm unable to import aspose in any python script:

import aspose.words as aw
...

err:

$ /opt/homebrew/bin/python3 /Users/alaa/Developer/BASS/Docs/aspose-convertCHM2HTML.py
Traceback (most recent call last):
  File "/Users/alaa/Developer/BASS/Docs/aspose-convertCHM2HTML.py", line 1, in <module>
    import aspose.words as aw
ModuleNotFoundError: No module named 'aspose'

I have an ARM64 M1 MBA with macOS 14.5
& I'm using VSCode here.

I tried to import the package using different python versions, but the issue persisted.

Python 3.12 support

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!

Cannot run sample program, Process killed

Hello,

I am trying to test the python library, I am using macOS-arm64, using the preinstalled python version on the system which has as version: Python 3.9.6.

I just installed the library pip3 install aspose.words

running a sample program

import aspose.words as aw

doc = aw.Document()
builder = aw.DocumentBuilder(doc)
            
builder.write("Hello world!")

doc.save("./output.docx")

process almost instantly killed:
python3 test.py
[1] 2714 killed python3 test.py

any ideas why this might be?

Thank you!

sign date error

你好!
在使用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~

Advertise

Dad, my friend, how can I delete these ads you posted?

centos7.9 err

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?

OpenSSL 3.0 not supported

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 am wondering why converting from jpg/png to svg gives nothing content in converted svg, when i run the code on my local environment?

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 !!

import error

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.