in Education by
I'm trying to open up a PDF as an image using Wand. If I run the code below in Jupyter Notebook, it works fine. If I run the code as a script from Command Prompt, I get an error message. For some reason, the module won't load when it's run outside of Jupyter Notebook. Does anyone have any suggestions? Windows Python 3.7.2 (64 bit) from wand.image import Image with Image(filename="C:/test.pdf", resolution=300) as img: print(type(img)) This is the error message: Traceback (most recent call last): File "C:\Untitled.py", line 7, in from wand.image import Image File "C:\Users\spencer.rand\AppData\Local\Programs\Python\Python37\lib\site-packages\wand\image.py", line 18, in from . import compat File "C:\Users\spencer.rand\AppData\Local\Programs\Python\Python37\lib\site-packages\wand\compat.py", line 25, in abc = collections.abc if PY3 else collections File "C:\Users\spencer.rand\AppData\Local\Programs\Python\Python37\lib\collections\__init__.py", line 55, in __getattr__ raise AttributeError(f'module {__name__!r} has no attribute {name!r}') AttributeError: module 'collections' has no attribute 'abc' JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Looks like there's an issue with wand and collections that was fixed 2 weeks ago: https://github.com/emcconville/wand/pull/398 Try updating your wand install: pip install --upgrade wand

Related questions

0 votes
    This is my code it's just starting the scan but it is not completing ,where is the error in it. ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 26, 2022 in Education by JackTerrance
0 votes
    Visual Studio Code has option to connect to jupyter notebook. When it's done I can execute my script ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    Jupyter notebooks (Python) return the value of the last variable in a cell in a pretty printed format. ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
0 votes
    I have recently quoted a Deep Learning VM from Google Cloud. DLVM provides a link to the jupyter notebook ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    If I use a while loop for my below code, it is not giving the desired output, but when i use for loop i am anle ... x += 1 print(Comm) Select the correct answer from above options...
asked Jan 9, 2022 in Education by JackTerrance
0 votes
    program code for this question: Raju has a lot of strings but he does not like all of them.He likes only Swaggy ... at least K times. Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    def main(): for i in xrange(10**8): pass main() This piece of code in Python runs in (Note: The timing is ... sys 0m0.012s Why is this? Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    What Does My Name Mean, If my Mother is a Mathematician, and my Father is a Chemist. And they gave a Code to My Name as "Iron59". Crack my Name? A) Elix B) Alex C) Selix D) Felix...
asked Feb 11, 2021 by JackTerrance
0 votes
    This question already has answers here: How to access the correct `this` inside a callback (13 answers) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 4, 2022 in Education by JackTerrance
0 votes
    What are you going to do if there is no Functional Spec or any documents related to the system and developer who wrote ... company anymore, but you have a system and need to test?...
asked Oct 17, 2020 in Technology by JackTerrance
0 votes
    When I run pip3 install -r requirements.txt on the project I get this error message: pip._vendor.pkg_resources. ... on my machine. Select the correct answer from above options...
asked Jan 19, 2022 in Education by JackTerrance
0 votes
    How to check which Python version is interpreting my script? Select the correct answer from above options...
asked Jan 23, 2022 in Education by JackTerrance
0 votes
    Why Zn reacts with dilute H2SO4 to give H2 gas but Cu does not ? Select the correct answer from above options...
asked Jan 5, 2022 in Education by JackTerrance
0 votes
    Why coal or petrol does not burn by itself in air but once initiated by flame, it continues to burn? Select the correct answer from above options...
asked Jan 4, 2022 in Education by JackTerrance
0 votes
    Simran write a code print: (“hello friends”)but when she executed there comes an error what was the error and why did it occur Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
...