question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: cannot import name properties

See original GitHub issue

Hi –

I’m sure that this is a basic question, but I am having trouble importing the files needed to run to run WeasyPrint.

My code, up to the error:

import weasyprint
from __future__ import print_function
import pandas as pd
import numpy as np
import argparse
from jinja2 import Environment, FileSystemLoader
from weasyprint import HTML

The Error

----> 6 import weasyprint
      7 from __future__ import print_function
      8 import pandas as pd

...   /python2.7/site-packages/weasyprint/__init__.py in <module>()
    373 
    374 # Work around circular imports.
--> 375 from .css import preprocess_stylesheet  # noqa
    376 from .html import (
    377     find_base_url, HTML5_UA_STYLESHEET, HTML5_PH_STYLESHEET,

...   /python2.7/site-packages/weasyprint/css/__init__.py in <module>()
     27 import tinycss2
     28 
---> 29 from . import properties
     30 from . import computed_values
     31 from .descriptors import preprocess_descriptors

ImportError: cannot import name properties

I am running this code on a Jupyter notebook using a Mac. Is there a simple package that I am missing that I can pip install? Thank you

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
GoldenRatio3commented, Dec 8, 2017

@liZe Solved!

For anyone else having this problem it is due to missing dependencies, to fix ssh into ec2 box and run this command:

sudo yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel

To save time you can include these dependencies in your .ebextensions/django.config file

0reactions
sunsetjunkscommented, Jun 17, 2020

@liZe Solved!

For anyone else having this problem it is due to missing dependencies, to fix ssh into ec2 box and run this command:

sudo yum install cairo cairo-devel cairomm-devel libjpeg-turbo-devel pango pango-devel pangomm pangomm-devel giflib-devel

To save time you can include these dependencies in your .ebextensions/django.config file

this helped me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name properties python error while ...
Looks like you want to use pyserial , but pyserial has no properties.py , no meta.py and no model.py ...
Read more >
How do I fix this error "Cannot import "Iterator" since a property ...
When running the FPOS upgrade task, this error appears in IBM Enterprise Record's configuration manager. "Cannot import "Iterator" since a property by that...
Read more >
[Fixed] ModuleNotFoundError: No module named 'cached ...
Solution Idea 1: Install Library cached-property. The most likely reason is that Python doesn't provide cached-property in its standard library. You need to ......
Read more >
Review and troubleshoot import errors
You cannot edit a read-only property, so you'll need to update and ... Click the name of the error in the left-most column...
Read more >
Data Import error message reference - Analytics Help
Message Meaning So... Empty column header at column number X. The upload file is missing a column header. Ed... Multiple errors occurred: List of multiple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found