python-2.7 Questions

4

Solved

I would like to fit a 2D array by an elliptic function: (x / a)² + (y / b)² = 1 ----> (and so get the a and b) And then, be able to replot it on my graph. I found many examples on internet, but n...
Acrid asked 18/12, 2017 at 17:44

19

Whenever I am trying to compile the following code to get a line graph shows some errors. But I don't know how to fix it. Here is my code : import plotly.plotly as py import plotly.graph_objs as go...
Arrange asked 1/3, 2017 at 1:45

6

my problem is about i have a file that contain class and inside this class there is bunch of code will be executed so whenever i import that file it will executed ! without creating an object of ...
Astyanax asked 17/8, 2012 at 17:10

2

When I try to build chromium on Windows10, I get: ImportError: No module named win32file How to solve this?
Alter asked 6/4, 2019 at 16:40

4

I am trying to import KafkaConsumer from kafka. It says: no module named kafka from kafka import KafkaConsumer import sys consumer = KafkaConsumer('test', bootstrap_servers='10.221.129.223...
Boz asked 26/4, 2018 at 6:4

5

Is there any way to convert .ppt files to .pptx files. Objective: I need to extract text from table (with Column Names as Name, address, contact number, email, etc) from .ppt files. For this I fol...
Autobahn asked 14/8, 2017 at 8:6

10

Solved

I installed telegram packages. But when I try to run the simple example, echobot.py, I got an error: Traceback (most recent call last): File "echobot.py", line 8, in <module> import telegra...
Iodic asked 28/7, 2017 at 21:30

9

Solved

When my selenium program crashes due to some error, it seems to leave behind running processes. For example, here is my process list: carol 30186 0.0 0.0 103576 7196 pts/11 Sl 00:45 0:00 /home/c...

10

Solved

I installed Scrapy in my python 2.7 environment in windows 7 but when I trying to start a new Scrapy project using scrapy startproject newProject the command prompt show this massage 'scrapy' is n...
Jojo asked 14/9, 2016 at 9:28

8

Solved

I`m trying to deploy a django project to AWS Beanstalk following this tutorial. I executed eb create and after a while I get the error The instance profile aws-elasticbeanstalk-ec2-role associ...

2

Solved

Trying to make the pie larger. Looking at the docs, and other places, it says to set the radius. It seems no matter which value I put in the radius there's no increase. I'm posting the full code an...
Carminecarmita asked 9/3, 2018 at 17:32

5

Solved

I need to replace the value inside a capture group of a regular expression with some arbitrary value; I've had a look at the re.sub, but it seems to be working in a different way. I have a string ...
Saleh asked 20/11, 2017 at 16:38

9

I need to convert a binary input into a decimal integer. I know how to go from a decimal to a binary: n = int(raw_input('enter a number: ')) print '{0:b}'.format(n) I need to go in the reverse d...
Carabiniere asked 13/2, 2014 at 21:23

5

Solved

I have been working on this error for a long time now. I have Python 3.6 and Python 2.7. I have tried to install opencv 2 and 3 in Python 2.7 and Python 3.6 respectively. I know the python interpre...
Ferdelance asked 20/10, 2017 at 17:27

10

Solved

I am trying to get up and running with AWS Lambda Python (beginner in Python btw) but having some problems with including MySQL dependency. I am trying to follow the instructions here on my Mac. F...

3

I am working on a small command line tool using Python 2 and click. My tool either needs to write a value, read it, or do not change it. It would be nice if I could do the following: mytool --r0=0...
Gaberlunzie asked 23/11, 2016 at 0:15

5

Solved

I'm trying to write a CSV file using Python's csv writer. One of the column values is enclosed in "" [double quotes] e.g.: 'col1' 'col2' "test". When I open the file in Wordpad,...
Galimatias asked 31/7, 2014 at 10:43

2

I am using google oAuth for my python application in which I have feature to automatically logging in by google into my app. When I try to login first time, it will be successfull, but from next ti...
Tortosa asked 30/8, 2013 at 10:58

7

Solved

I just upgraded my django from 1.7.1 to 1.8.4. I tried to run python manage.py migrate but I got this error: django.db.utils.ProgrammingError: relation "django_content_type" does not exist I drop...

2

I am using Python's image processing libraries to render images of characters using different fonts. Here's a snippet of the code that I'm using to iterate through a list of fonts and a list of ch...
Germano asked 23/12, 2017 at 0:41

2

After adding bbox_inches="tight" to an invocation of plt.savefig that has worked for several years, I get /usr/local/lib/python2.7/site-packages/matplotlib/figure.py:1744: UserWarning: ...
Lasseter asked 14/2, 2016 at 16:4

3

Solved

I need to add an image to a pptx slide, and want to locate it in the center of the slide, without having to calculate the size and alignment manually, I found a question about doing so with text:...
Yorgo asked 20/10, 2016 at 9:5

5

Solved

I am writing a python script which checks various conditions and runs a powershell script accordingly to help me automate migration from windows XP to windows 7. The powershell script gives its own...
Mai asked 21/2, 2014 at 20:50

5

Solved

Since the most recent update to Windows 10, I have been seeing this message every time I try to do anything with Python I have reinstalled it, tried running it as administrator. Nothing works.
Wilcher asked 6/6, 2017 at 16:9

2

Solved

Hello I am new to Python and do not know how to minimize a specific window in this case Microsoft Word 2010 all I can minimize is the Python Shell. Here is my code just in case you need it. import...
Caballero asked 23/8, 2014 at 22:6

© 2022 - 2024 — McMap. All rights reserved.