Stylesheet parsing error for [dir=rtl] when using cssutils python module

I'm parsing a css stylesheet with cssutils python module. The parser emits an error when reaching the "[dir=ltr] div.row div.label" selector. I would like to find a way to modify the CSS to make...

From HTML to CSS style with Python

I've extracted certain elements from a HTML page with beautifulsoup and want to extract the according CSS styles (which reside in most cases in external css files) via python. How can i get a...

Search cssutils.py parse tree by ID and CLASS selectors

I'm using cssutils in Python to parse CSS style files and would like to search the parse tree by ID and Class. That is, given some CSS style file and some Class name (e.g. div navbar), how do I...

Using cssutils to access or read the properties of page rule

I have read/write the properties of Font_face rule and style rule in css file. Using the cssutils version 0.9.6 and programming language in python. I try to read ,access the property of page...

Why aren't my modules installed via easy_install useable?

I recently tried to install a couple of python modules via easy_install on my mac. Background: I'm using OS X 10.6.8 and Python 2.7.2. If I run which python I get the...

From virtualenv, pip freeze > requirements.txt give TONES of garbage! How to trim it out?

I'm following this tutorial: http://devcenter.heroku.com/articles/django At some point I'm suposed to do: pip freeze > requirements.txt (Ofc. from virtualenv created instance of python) And I...

Python logging + webassets + cssutils: set log level for cssutils

I am using jinja and webassets for my assets management along with cssutils to minify and combine css files. the problem is when cssutils produces a "fatal error" it kicks off the email alert...

Multiple Models in a single django ModelForm error IntegrityError

I have one formulaic with mutiples models and to mark the mistake to the moment to guard the information I leave them the mistake that marks me when I try to guard the information ...

Why would a Python import succeed when invoking *.py file from python but not when invoked by file name alone

I'm in the early stages of integrating some Python to invoke some computations in Matlab and roll up all the figures into some html generation I'll be doing in ll.xist. I had initially installed...

How do i edit rule with cssutils in python

I have never used cssutils in python. when I print a rule I get the following string, how do I edit the css rule in python? For example if I wanted to change the background...

How to install a python egg

I'm trying to setup ftw.mail for my postfix installation. Since I'm new to Linux and Python I don't really have a clue whether it is right, goes in the right direction or is rubbish. From the...

Install Calibre Debian Sid

I'm having problems installing calibre, when I use aptitude install calibre I get this output [email protected]:/home/gustavo# aptitude install calibre The following NEW packages will be...

Pants includes OS X specific Python wheels

TLDR: Pants fetches OS X specific wheels bc I'm developing on Mac. How can I avoid this, or specify that I will deploy to Ubuntu? Full story: Trying to package a Python application with Pants....

Setup Apache2 mod_wsgi for sentry

I already used sentry 8.1 that installed on a virtualenv by below apache configs: <VirtualHost x.x.x.x:80> WSGIDaemonProcess sentry...

numpy asarray float32 works on Ubuntu but not Windows 7

Update Critique would be nice if a downvote is necesarry. Question has been modified since. I followed the instructions here Steps 1 and 2 have been checked. My Intel(R) Core(TM) i7-2860QM CPU @...

Scraping font-size from HTML and CSS

I am trying to scrape the font-size of each section of text in an HTML page. I have spent the past few days trying to do it, but I feel like I am trying to re-invent the wheel. I have looked at...

Cant find module Django while deploying on Elastic Beanstalk

I am trying to deploy the backend of this repository https://github.com/LaunchKit/LaunchKit on Elastic Beanstalk. I am very new to Django and I successfully did those two tutorials explaining how...

Python - AttributeError: module 'cssutils' has no attribute 'getUrl'

I am trying to extract URLs from CSS stylesheet using cssutils.getUrls('stylesheet.css') However when I run the code I get an error complaining about 'getUrls' see below. I am running on python...

How do I use the django-cms Python api to create a page?

I'm trying to write a CMS content migration script that will create our pages for django-cms. However even with the default install of Django-cms, Django-treebeard keeps raising exceptions and...

SQLAlchemy - Multiple Foreign key pointing to same table same attribute

My data base structure.... class Person(db.Model): id = db.Column(db.Integer, primary_key=True) user = db.relationship("BankSlip", back_populates="person_user") reference =...

Why does only one of two virtualenvs hit "OpenSSL.SSL.Error: 'PEM routines', 'PEM_read_bio',... 'SSL_CTX_use_PrivateKey_file'..."?

In the process of updating a virtualenv I seem to have gotten things out of whack in the ssl libraries or something. Code that previously worked in either of two virtualenvs now works in only one;...

ssl handshake failure using proxy for scrapy

I'm trying to setup a proxy on a scrapy project. I followed te instructions from this answer: "1-Create a new file called “middlewares.py” and save it in your scrapy project and add the...

python3 requirements.txt file shows unwanted packages

I created a virtual environment using : python3 -m venv . I then used the command pip freeze requirements.txt to get the list of packages. Below is the content of the file...

get-pip.py error UnboundLocalError: local variable 'result' referenced before assignment

What is wrong here? I am trying to install openstack-ansible and this is look like pip related issue, all i found this in google and not sure its related to my issue or not...

ImportError: cannot import name 'hex_regex'

I'm working on adding django-location-field. However when I add the following code from django.contrib.gis.geos import Point from location_field.models.spatial import LocationField address =...

vscode python import failure in win10

I have been using Visual Studio Code to develop some python programs. Modules that I import include numpy and cssutils. Sometimes VS CODE asked for upgrade that I usually agreed. Then today, VS...

Ansible failed to complete because of deprecated Python even though Python 3 is installed

I'm trying to run LaunchKit from google to get some app screenshots. I've gone through all of the steps on the GitHub page (https://github.com/LaunchKit/LaunchKit) for the open source code. After...

Cannot fix django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet

I run the following line of code on a Docker container: RUN python3 manage.py sitetree_resync_apps --settings=sites.production.settings and I get the following error: Traceback (most recent call...

I get 'AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel' when trying to build a Docker image of a python app

I am trying to build a docker image of a python application. It fails with the following error: "Installing build dependencies: finished with status 'done' Getting requirements to build wheel:...

Heroku SSL connection error unsupported protocol

I have been using Heroku for a while to host my Discord bot. It has been connecting to a MySQL database hosted on ClearDB successfully. However, very recently, whenever I use the bot and it tries...

Relevant tags