Questions tagged as 'python'

1
answer

Show modal only if there is an active session

When someone registers your name and email I create a session and render the page with the name of who registered, but I can not understand how I do it so that the time I render the page again appears a modal . views.py: from django.sho...
asked by 19.09.2018 / 16:04
1
answer

Error in index, as non-existent

I am getting an error message in line 7 of the code, which says url=to_crawl[0] - IndexError: list index out of range import requests import re to_crawl=['https://www.globo.com'] crawled=set() header={'user-agent':'Mozilla/5.0 (X11;...
asked by 14.09.2018 / 03:45
0
answers

Change default virtualenv installation directory on Anaconda

Using the command: conda create --name myenv-test python=3.6 By default Anaconda creates virtualenv within the C: \ Users \ You-user \ Anaconda3 \ envs I would like to create my virtualenv within a specific folder (leave each virtualenv...
asked by 11.09.2018 / 22:40
0
answers

Kivy / Python- How to call a method from a different class?

Hey guys, I have a question that should theoretically be simple, but I do not know how to do it. Basically I'm doing a simple app where you can create tasks and add to a list, I wanted to make a screen to show the tasks created and one to create...
asked by 28.09.2018 / 14:04
1
answer

How to filter tweets (status) with tweepy (Cursor)

I took the following code from the book "Mastering social media mining with python", which saves all the tweets of a user in the JSON format. But I'd like it saved in json only tweets of a certain date. How to do? This is the code that saves...
asked by 11.09.2018 / 22:13
1
answer

Convert dictionary dictionaries into class

I have a dictionary that contains activities name and some characteristics of this activity. I created a class called process and want to iterate in my dictionary creating processes. process_name = ['processo1', 'processo2', 'processo3'] pr...
asked by 12.09.2018 / 21:40
1
answer

IndexError: list index out of range Python

I'm getting the following error: IndexError: list index out of range My code: conts = conts[0] if imutils.is_cv2() else conts[1] How can I fix this error? Full Code     
asked by 12.09.2018 / 20:02
1
answer

Imports in python that are not found

Good afternoon!    I'm facing some problems with imports downloaded with the pip, more specifically imports Pypi Wikipedia and Google ...    I install both via pip install and they can be found in the site-packages folder in Python. But imports...
asked by 12.09.2018 / 20:01
0
answers

Find multiple values in database using django / python

I have a question a little hard to explain: I need to do some database queries and the data is structured in the following way: Alias table: SELECT id, alias_type, alias_value, individual_id FROM 'snpdb_alias' (84, 'ID_ASSOC', 'PMGS0001'...
asked by 10.09.2018 / 17:30
0
answers

Error: module import emoji no found

I am practicing a python class and need to download the emoji library so that the program after running print the emoji that the user typed. However, at run time, it says the library is not installed. I followed the internet tutorial steps...
asked by 10.09.2018 / 18:09