Aspose.words import issue

Hi Team,

while trying to import aspose.words as aw and aspose.email getting this error.raceback(most recent call last):

File "", line 1, in 
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 668, in _load_unlocked
File "", line 640, in _load_backward_compatible
KeyError: ‘aspose.email’
Traceback (most recent call last):
File "", line 967, in _find_and_load_unlocked
File "", line 668, in _load_unlocked
File "", line 640, in _load_backward_compatible
KeyError: ‘aspose.words’

Tried uninstalling and reinstalling the package multiple times

@Sijo.Kolambran I cannot reproduce the problem on my side. I hve installed Aspose.Words and Aspose.Email for Python using the following commands:

pip install aspose-words
pip install Aspose.Email-for-Python-via-NET

and then used the following simple code for testing:

import aspose.email as ae
import aspose.words as aw

msg = ae.MailMessage.load("C:\\Temp\\in.msg")
msg.save("C:\\Temp\\tmp.mhtml", ae.MhtSaveOptions())

doc = aw.Document("C:\\Temp\\tmp.mhtml")
doc.save("C:\\Temp\\out.pdf")

The code converts MSG file to PDF using Aspose.Email and Aspose.Words.

I have something similar like this issue…anything that can help fix
https://www.appsloveworld.com/python/2305/trouble-importing-aspose-words-on-python-keyerror-aspose-words#:~:text=Trouble%20importing%20aspose.words%20on%20python%20%3A%20%28KeyError%3A%20%27aspose.words%27%29,many%20%2A.pyd%20and%20%2A.dll%20files%20needed%20to%20work. I have been using it for months, yesterday i installed aspose pdf. Now i can only see pdf not email or word. any help would be appreciated

@Sijo.Kolambran The problem occurs because different versions of wrapper generator were used for creating Aspose packages. We are working on resolving this problem.
For now you can try reinstalling the package that was created by the most recent version of wrapper generator. On my side the following helped:

pip uninstall Aspose.Email-for-Python-via-NET

and then

pip install Aspose.Email-for-Python-via-NET

Hi,
For me reinstalling didn’t help. is there any other way. below are the versions im using
aspose-pdf==23.3.0
aspose-words==23.4.0
Aspose.Email-for-Python-via-NET==23.3.
aspose pdf works fine but the other two doesn’t work. Previously i was using
aspose-words==22.6.0

Aspose.Email-for-Python-via-NET==22.4.
i have started using aspose pdf recently with version 23.3.0

@Sijo.Kolambran I use exactly the same versions. Could you please provide the code you are using for testing and error message you see?
Also, please make sure you installed Aspose.Email-for-Python-via-NET package last.