Questions tagged as 'python'

2
answers

numpy.int64 to string

I read a file in pandas and I pick up the value of a cell in the EXCEL sheet let's say prov = lectura.iat[1,7] tells me that prov is of type numpy.int64 with print(type(prov)) then I want to use this variable by adding i...
asked by 17.09.2018 / 11:20
0
answers

encode image in python

I need to code an image and save the generated text in a database, then I need to be able to load that saved text, re-encode it to an image and display it in html. Thanks to any help     
asked by 17.09.2018 / 18:29
0
answers

Error in modules

I want to make a module but it does not work and I do not know why. I have two .py3 files in the same folder: function_mates and call_function_mates. In function_mates I have functions that perform operations and it works. In calling_funcion_mat...
asked by 01.09.2018 / 18:37
0
answers

Python error TypeError: 1535922562 is not serializable JSON

I'm running a script that returns error, but I can not interpret what it refers to. SELECT * FROM tabla WHERE id = 'b827eb9eea3e' AND time BETWEEN 1535922562 AND 1535922562 1535922562 index -3 timezone 1535922562 <type 'numpy.int64'> (6...
asked by 03.09.2018 / 03:32
0
answers

Declare a matrix correctly

QUESTION EDITED, the first time I had misplaced the case I want to work with matrices but I can not understand how to do it. I want each time you click with the mouse to save the X and Y positions of your position. For this I wanted to c...
asked by 02.09.2018 / 18:32
0
answers

Error in pip (Python3, Linux)

I am learning how to create distributable packages with Python, and created one and now I want to install it on my own PC with linux. Before, I was not allowed to create the setup because I did not have setuptools installed, I installed it and d...
asked by 02.09.2018 / 19:00
0
answers

View the database of my python program remotely

I have a program called art-dent in python linked with sqlite3 that comes as default in python .. this program is installed on my computer .. how do I get my father in another city to see this database? You only need to see it but not modify it...
asked by 12.09.2018 / 03:27
1
answer

No 'Access-Control-Allow-Origin' header is present on the requested resource (flask - python - js)

The following is the code I use to pick up the URL " link "  (RESTful API - Python and Flask) from flask import Flask, request from flask_restful import Resource, Api from sqlalchemy import create_engine from json import dump...
asked by 31.08.2018 / 20:01
1
answer

how can I declare an equation in a for so that all the values in my array do it

I would like to know how I can make a function, take all the values of my array. and save them in a new variable. I attach my code, I hope it works import matplotlib.pyplot as plt l = [36.83, 31.75, 43.815, 36.83, 32.06, 45.08, 35.88] p =...
asked by 06.09.2018 / 05:26
0
answers

Spider error processing url

I am making my first spider, I need to enter a specific category, enter the publications and obtain the required data, but I found the following error that I can not solve. items.py import scrapy class ReporteinmobiliarioItem(scrapy.Ite...
asked by 11.09.2018 / 15:48