Skip to content
Advertisement

Python – requests.exceptions.SSLError – dh key too small

I’m scraping some internal pages using Python and requests. I’ve turned off SSL verifications and warnings. On certain servers I receive an SSL error I can’t get past. This happens both in/out of Cygwin, in Windows and OSX. My research hinted at outdated OpenSSL on the server. I’m looking for a fix client side ideally. Edit: I was able to

Accessing Revit API from outside Revit

I’ve used RevitPythonShell and Dynamo, but would like to use my existing Python IDE (Eclipse) where I have my configuration for logging, debugging, GitHub integration, etc. I’m comfortable with transactions and the overall API, and I’ve invested some time in reading about the Revit API and modeless connections, and others asking similar questions. Some of them are a few years

Save Matplotlib figure as TIFF

Does anyone know how to save a Matplotlib figure as *.tiff? It seems that this format is not supported in Python, while the journals are quite often ask for that format. I am adding some minimal code: This works: But this does not: Answer This is great! Thanks ot Martin Evans. However, for those who would like to make it

How do I merge two django db’s?

I have two instances of the same Django app. I need to merge the data in these DBs to one DB. I considered Natural Key fixtures, but I have many objects whose natural key involves fields from a related model, so they are not being serialized when I am serializing using natural keys. For example This account’s fixture: (notice it

How to create a tuple of an empty tuple in Python?

How can I create a tuple consisting of just an empty tuple, i.e. (())? I have tried tuple(tuple()), tuple(tuple(tuple())), tuple([]) and tuple(tuple([])) which all gave me (). The reason that I use such a thing is as follows: Assume you have n bags with m items. To represent a list of items in a bag, I use a tuple of

Artificially creating memory usage in Python

I’m trying to create a pure memory intensive script in Python for testing purposes but every script that I try also increases my cpu. I’ve read this post and I also tried, among others: in order to copy an array to another array but once again I had cpu variations as well. UPDATED So, how can I cause a standard

Advertisement