How to create widgets within same row?
I'm trying to a column of different widgets but can't seem to find anything like it.
For clarity: https://imgur.com/a/7L1q0
/r/IPython
https://redd.it/8blu3z
I'm trying to a column of different widgets but can't seem to find anything like it.
For clarity: https://imgur.com/a/7L1q0
/r/IPython
https://redd.it/8blu3z
Imgur
Ipython Widget
Imgur: The magic of the Internet
django-firebird 1.9.1 is released
https://www.firebirdnews.org/django-firebird-1-9-1-is-released/
/r/django
https://redd.it/8bo5i8
https://www.firebirdnews.org/django-firebird-1-9-1-is-released/
/r/django
https://redd.it/8bo5i8
How to undo migration after pip uninstalling 3rd party package
So I pip installed the django-axes package today. Migrated the migrations that came with it. Then it turned out that the package installed was missing the needed "backends.py" file for some reason. I copied the one on the git repo and dropped it into the installed package folder and it gave me another error.
So I pip uninstalled the whole thing. But looking into my PostgreSQL database, the two tables (axes_accessattempt and axes_accesslog) created by the django-axes migrations are still there.
How is this type of situation handled normally? Just run a SQL command to drop those 2 tables manually? I already have some data in the database, so I don't want to mess it up inadvertently further.
Also, is it normal for a pip install package to be missing vital files?
Thanks.
/r/django
https://redd.it/8bpekc
So I pip installed the django-axes package today. Migrated the migrations that came with it. Then it turned out that the package installed was missing the needed "backends.py" file for some reason. I copied the one on the git repo and dropped it into the installed package folder and it gave me another error.
So I pip uninstalled the whole thing. But looking into my PostgreSQL database, the two tables (axes_accessattempt and axes_accesslog) created by the django-axes migrations are still there.
How is this type of situation handled normally? Just run a SQL command to drop those 2 tables manually? I already have some data in the database, so I don't want to mess it up inadvertently further.
Also, is it normal for a pip install package to be missing vital files?
Thanks.
/r/django
https://redd.it/8bpekc
reddit
How to undo migration after pip uninstalling 3rd party... • r/django
So I pip installed the django-axes package today. Migrated the migrations that came with it. Then it turned out that the package installed was...
Python's Pandas in C++
I have implemented a C++ library with similar interface and functionality to Pandas at https://github.com/hosseinmoein/DataFrame. It still lacks a lot of functionalities which I will add gradually. I appreciates your constructive criticisms and suggestions.
/r/Python
https://redd.it/8bq5js
I have implemented a C++ library with similar interface and functionality to Pandas at https://github.com/hosseinmoein/DataFrame. It still lacks a lot of functionalities which I will add gradually. I appreciates your constructive criticisms and suggestions.
/r/Python
https://redd.it/8bq5js
GitHub
GitHub - hosseinmoein/DataFrame: C++ DataFrame for statistical, financial, and ML analysis in modern C++
C++ DataFrame for statistical, financial, and ML analysis in modern C++ - hosseinmoein/DataFrame
[AF] Handling nested dictionaries with standard python requests library
Hey /r/flask,
I recently got my first [Flask webapp](http://www.asosquery.com/) hosted, and built a relatively simple API around it. It's driven by a very large database full of open meteorological surface observations (more info on the `/about` page), and right now I'm able to query the API with the following sample code (a separate script written for testing):
import requests
import json
r = requests.get('http://www.asosquery.com/api/v1/stations?state=PA&lat={"gt": 39, "lt": 50}')
content = json.loads(r)
This returns JSON-encoded information regarding all [ASOS stations](http://www.nws.noaa.gov/ost/asostech.html) with a latitude greater than 39.00 N and less than 50.00 N. A SQLAlchemy query of the MySQL database is dynamically generated based on the arguments in the `GET` request.
However, I would like to be able to do something like this, following an example on the [requests package documentation](http://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls):
import requests # standard python requests package
import json
payload = {
'state': 'PA',
'lat': {
'gt': 39,
'lt': 50
}
}
r = requests.get('http://www.asosquery.com/api/v1/stations', params=payload)
content = json.loads(r)
This exercise fails each time. In the Flask route `/api/v1/stations`, I've tried printing the request made to the server like this:
from flask import request
@app.route('/api/v1/stations', methods=['GET'])
def get_stations():
print(request)
print(request.args)
# -- do the query stuff here -- #
return jsonify(query_results)
But, the output (prior to a raised error) is not as I expected it to be:
# print(request) prints:
<Request 'http://localhost:5000/api/v1/stations?lat=lt&lat=gt&state=PA' [GET]>
# print(request.args) prints:
ImmutableMultiDict([('lat', 'lt'), ('lat', 'gt'), ('state', 'PA')])
I've tried encoding the `payload` as JSON with the following:
r = requests.get('http://www.asosquery.com/api/v1/stations', params=json.dumps(payload), headers={'Content-Type': 'application/json'})
but execution of that code prints the following in from the flask route:
# print(request) prints:
<Request 'http://localhost:5000/api/v1/stations?{"state": "PA", "lat": {"gt": 39, "lt": 50}}' [GET]>
# print(request.args) prints:
ImmutableMultiDict([('{"state": "PA", "lat": {"gt": 39, "lt": 50}}', '')])
Here, I don't really understand why the `requests.args` is formatted like that... The information in the `key` is pretty much what I expect it to be, but the blank `value` is throwing me for a loop. I could probably handle that by just processing the information in the `key`, but that's going to require an extra level of complexity I'd like to be able to avoid.
Anybody know a good workaround? Am I handling the greater-than, less-than functionality in the best way possible?
Thank you in advance to all who offer some insight.
/r/flask
https://redd.it/8bsh8h
Hey /r/flask,
I recently got my first [Flask webapp](http://www.asosquery.com/) hosted, and built a relatively simple API around it. It's driven by a very large database full of open meteorological surface observations (more info on the `/about` page), and right now I'm able to query the API with the following sample code (a separate script written for testing):
import requests
import json
r = requests.get('http://www.asosquery.com/api/v1/stations?state=PA&lat={"gt": 39, "lt": 50}')
content = json.loads(r)
This returns JSON-encoded information regarding all [ASOS stations](http://www.nws.noaa.gov/ost/asostech.html) with a latitude greater than 39.00 N and less than 50.00 N. A SQLAlchemy query of the MySQL database is dynamically generated based on the arguments in the `GET` request.
However, I would like to be able to do something like this, following an example on the [requests package documentation](http://docs.python-requests.org/en/master/user/quickstart/#passing-parameters-in-urls):
import requests # standard python requests package
import json
payload = {
'state': 'PA',
'lat': {
'gt': 39,
'lt': 50
}
}
r = requests.get('http://www.asosquery.com/api/v1/stations', params=payload)
content = json.loads(r)
This exercise fails each time. In the Flask route `/api/v1/stations`, I've tried printing the request made to the server like this:
from flask import request
@app.route('/api/v1/stations', methods=['GET'])
def get_stations():
print(request)
print(request.args)
# -- do the query stuff here -- #
return jsonify(query_results)
But, the output (prior to a raised error) is not as I expected it to be:
# print(request) prints:
<Request 'http://localhost:5000/api/v1/stations?lat=lt&lat=gt&state=PA' [GET]>
# print(request.args) prints:
ImmutableMultiDict([('lat', 'lt'), ('lat', 'gt'), ('state', 'PA')])
I've tried encoding the `payload` as JSON with the following:
r = requests.get('http://www.asosquery.com/api/v1/stations', params=json.dumps(payload), headers={'Content-Type': 'application/json'})
but execution of that code prints the following in from the flask route:
# print(request) prints:
<Request 'http://localhost:5000/api/v1/stations?{"state": "PA", "lat": {"gt": 39, "lt": 50}}' [GET]>
# print(request.args) prints:
ImmutableMultiDict([('{"state": "PA", "lat": {"gt": 39, "lt": 50}}', '')])
Here, I don't really understand why the `requests.args` is formatted like that... The information in the `key` is pretty much what I expect it to be, but the blank `value` is throwing me for a loop. I could probably handle that by just processing the information in the `key`, but that's going to require an extra level of complexity I'd like to be able to avoid.
Anybody know a good workaround? Am I handling the greater-than, less-than functionality in the best way possible?
Thank you in advance to all who offer some insight.
/r/flask
https://redd.it/8bsh8h
Python Top 10 Articles for the Past Month-v.Apr 2018
https://medium.com/@Mybridge/python-top-10-articles-for-the-past-month-v-apr-2018-ba0fec7529cc
/r/Python
https://redd.it/8bpfdy
https://medium.com/@Mybridge/python-top-10-articles-for-the-past-month-v-apr-2018-ba0fec7529cc
/r/Python
https://redd.it/8bpfdy
Medium
Python Top 10 Articles for the Past Month (v.Apr 2018)
For the past month, we ranked nearly 1,000 Python articles to pick the Top 10 stories that can help advance your career (1% chance).
setInterval not auto refreshing.
Not sure what the issue is. I am using setInterval auto refresh data. The page is not actually going to the route. It seems like it is just reloading the old data.
Flask endpoint
@mod.route('/autoloaddata/', endpoint='autoloaddata')
I do an initial load when you first visit the page. Which works.
$(function(){
$("#loaddata").load("{{ url_for('datapage.autoloaddata') }}");
});
setInterval(function()
{
$('#testreload').load("autoload/");
$('#currentmap').load("autoload/");
}, 30000);
Looking at my console window `https://example.com/datapage/autoloaddata/` is coming back. But with the original load data. Its not hitting the route again.
if I copy the link from my console it hits the route and brings back new data.
/r/flask
https://redd.it/8brms4
Not sure what the issue is. I am using setInterval auto refresh data. The page is not actually going to the route. It seems like it is just reloading the old data.
Flask endpoint
@mod.route('/autoloaddata/', endpoint='autoloaddata')
I do an initial load when you first visit the page. Which works.
$(function(){
$("#loaddata").load("{{ url_for('datapage.autoloaddata') }}");
});
setInterval(function()
{
$('#testreload').load("autoload/");
$('#currentmap').load("autoload/");
}, 30000);
Looking at my console window `https://example.com/datapage/autoloaddata/` is coming back. But with the original load data. Its not hitting the route again.
if I copy the link from my console it hits the route and brings back new data.
/r/flask
https://redd.it/8brms4
RPi3, Flask and ds18b20 temperature sensor.
I need help.
I would like to use my Raspberry Pi 3 to get the temperature reading from ds18b20 sensor(1-wire) and then use flask to answer to GET requests with:
{
"temperature": 25.8
}
Right now I have successfully read data in console with python, but I can't figure it out how to combine this all with flask.
Maybe anyone has done it or can help me otherwise?
/r/flask
https://redd.it/8bq6u5
I need help.
I would like to use my Raspberry Pi 3 to get the temperature reading from ds18b20 sensor(1-wire) and then use flask to answer to GET requests with:
{
"temperature": 25.8
}
Right now I have successfully read data in console with python, but I can't figure it out how to combine this all with flask.
Maybe anyone has done it or can help me otherwise?
/r/flask
https://redd.it/8bq6u5
reddit
RPi3, Flask and ds18b20 temperature sensor. • r/flask
I need help. I would like to use my Raspberry Pi 3 to get the temperature reading from ds18b20 sensor(1-wire) and then use flask to answer to GET...
[P] Python script to extract features from images using various pretrained networks.
https://github.com/cameronfabbri/Compute-Features
/r/MachineLearning
https://redd.it/8bvqa9
https://github.com/cameronfabbri/Compute-Features
/r/MachineLearning
https://redd.it/8bvqa9
GitHub
GitHub - cameronfabbri/Compute-Features: Computes features for images using various pretrained Tensorflow models
Computes features for images using various pretrained Tensorflow models - GitHub - cameronfabbri/Compute-Features: Computes features for images using various pretrained Tensorflow models
[D] Anyone having trouble finding papers on a particular topic ? Post it here and we'll help you find papers on that topic ! | Plus answers from 'Helping read ML papers' post from few days ago.
There's a lot of variation in terms in machine learning which can make finding papers for a particular concept very tricky at times.
If you have a concept you would like to obtain more papers about, post it here (along with all papers you already found on said concept) and we'll help you find them.
I've seen a few times someone release a paper, and someone else point out someone has implemented very similar concepts in a previous paper.
Even the Google Brain team has trouble looking up all instances of previous work for a particular topic. A few months ago they released a paper of Swish activation function and people pointed out others have published stuff very similar to it.
>As has been pointed out, we missed prior works that proposed the same activation function. The fault lies entirely with me for not conducting a thorough enough literature search. My sincere apologies. We will revise our paper and give credit where credit is due.
https://www.reddit.com/r/MachineLearning/comments/773epu/r_swish_a_selfgated_activation_function_google/dojjag2/
So if this is something that happens to the Google Brain team, not being able to find all papers on a particular topic is something all people are prone too.
So post a topic/idea/concept, along with all the papers you already found on it, and we'll help you find more.
Even if you weren't thinking about looking for one in particular, it doesn't hurt to check if you missed anything. Post your concept anyway.
Here's an example of two papers whose authors didn't know about each other until they saw each other on twitter, and they posted papers on nearly the exact same idea, which afaik are the only two papers on that concept.
Word2Bits - Quantized Word Vectors
https://arxiv.org/abs/1803.05651
Binary Latent Representations for Efficient Ranking: Empirical Assessment
https://arxiv.org/abs/1706.07479
Exact same concept, but two very different ways of descriptions and terminology.
-----------------------------------------------
I also want to give an update to the post I made 3 days ago where I said I would help on any papers anyone was stuck on.
https://www.reddit.com/r/MachineLearning/comments/8b4vi0/d_anyone_having_trouble_reading_a_particular/
I wasn't able to answer all the questions, but I at least replied to each of them and started a discussion which would hopefully lead to Answers. Some discussions are on going and pretty interesting.
I actually indexed them by Paper name in this subreddit
https://www.reddit.com/r/MLPapersQandA/
I hope people go through them, because some questions are unanswered so perhaps there were some people who didn't get around to opening the papers, but when they see the discussion of the problem they'll know the answer and can answer it.
Also, there are a lot of FANTASTIC and insightful answers for the questions that did get answered. Special thanks to everyone who answered.
/u/TomorrowExam
/u/Sohakes
/u/RSchaeffer
/u/straw1239
/u/stuvx
/u/geomtry
/u/MohKohn
/u/bonoboTP
/u/min_sang
Apologies if I missed anyone.
I might do a round 2 of this in a week or two depending on how much free time I have, with a much better format I planned out.
Anyone who participates in this post will have priority if they have a paper by then.
/r/MachineLearning
https://redd.it/8bwuyg
There's a lot of variation in terms in machine learning which can make finding papers for a particular concept very tricky at times.
If you have a concept you would like to obtain more papers about, post it here (along with all papers you already found on said concept) and we'll help you find them.
I've seen a few times someone release a paper, and someone else point out someone has implemented very similar concepts in a previous paper.
Even the Google Brain team has trouble looking up all instances of previous work for a particular topic. A few months ago they released a paper of Swish activation function and people pointed out others have published stuff very similar to it.
>As has been pointed out, we missed prior works that proposed the same activation function. The fault lies entirely with me for not conducting a thorough enough literature search. My sincere apologies. We will revise our paper and give credit where credit is due.
https://www.reddit.com/r/MachineLearning/comments/773epu/r_swish_a_selfgated_activation_function_google/dojjag2/
So if this is something that happens to the Google Brain team, not being able to find all papers on a particular topic is something all people are prone too.
So post a topic/idea/concept, along with all the papers you already found on it, and we'll help you find more.
Even if you weren't thinking about looking for one in particular, it doesn't hurt to check if you missed anything. Post your concept anyway.
Here's an example of two papers whose authors didn't know about each other until they saw each other on twitter, and they posted papers on nearly the exact same idea, which afaik are the only two papers on that concept.
Word2Bits - Quantized Word Vectors
https://arxiv.org/abs/1803.05651
Binary Latent Representations for Efficient Ranking: Empirical Assessment
https://arxiv.org/abs/1706.07479
Exact same concept, but two very different ways of descriptions and terminology.
-----------------------------------------------
I also want to give an update to the post I made 3 days ago where I said I would help on any papers anyone was stuck on.
https://www.reddit.com/r/MachineLearning/comments/8b4vi0/d_anyone_having_trouble_reading_a_particular/
I wasn't able to answer all the questions, but I at least replied to each of them and started a discussion which would hopefully lead to Answers. Some discussions are on going and pretty interesting.
I actually indexed them by Paper name in this subreddit
https://www.reddit.com/r/MLPapersQandA/
I hope people go through them, because some questions are unanswered so perhaps there were some people who didn't get around to opening the papers, but when they see the discussion of the problem they'll know the answer and can answer it.
Also, there are a lot of FANTASTIC and insightful answers for the questions that did get answered. Special thanks to everyone who answered.
/u/TomorrowExam
/u/Sohakes
/u/RSchaeffer
/u/straw1239
/u/stuvx
/u/geomtry
/u/MohKohn
/u/bonoboTP
/u/min_sang
Apologies if I missed anyone.
I might do a round 2 of this in a week or two depending on how much free time I have, with a much better format I planned out.
Anyone who participates in this post will have priority if they have a paper by then.
/r/MachineLearning
https://redd.it/8bwuyg
reddit
[R] Swish: a Self-Gated Activation Function [Google Brain]
Posted in r/MachineLearning by u/xternalz • 77 points and 59 comments
Updating a single value of a row in a Database
Hi,
I'm trying to change a single value (an int in the postgres database) after pushing a button in a template. However, all tutorials that I could find talk about sending a full form of all the row to edit. Anyone have any idea to create a Form with a single value modified or something like that?
Thanks for your help, really new to Django and trying to get it right.
/r/djangolearning
https://redd.it/8bvwxk
Hi,
I'm trying to change a single value (an int in the postgres database) after pushing a button in a template. However, all tutorials that I could find talk about sending a full form of all the row to edit. Anyone have any idea to create a Form with a single value modified or something like that?
Thanks for your help, really new to Django and trying to get it right.
/r/djangolearning
https://redd.it/8bvwxk
reddit
Updating a single value of a row in a Database • r/djangolearning
Hi, I'm trying to change a single value (an int in the postgres database) after pushing a button in a template. However, all tutorials that I...
r/Python Official Job Board
Please read the rules \- they've updated slightly!
Top Level comments must be **Job Opportunities.**
Please include **Location** or any other **Requirements** in your comment. If you require people to work on site in San Francisco, *you must note that in your post.* If you require an Engineering degree, *you must note that in your post*.
Please include as much information as possible.
If you are looking for jobs, send a PM to the poster.
Going to try to make this board shorter term than the last post \- aiming for once every two months.
/r/Python
https://redd.it/8bx6md
Please read the rules \- they've updated slightly!
Top Level comments must be **Job Opportunities.**
Please include **Location** or any other **Requirements** in your comment. If you require people to work on site in San Francisco, *you must note that in your post.* If you require an Engineering degree, *you must note that in your post*.
Please include as much information as possible.
If you are looking for jobs, send a PM to the poster.
Going to try to make this board shorter term than the last post \- aiming for once every two months.
/r/Python
https://redd.it/8bx6md
reddit
r/Python Official Job Board • r/Python
Please read the rules \- they've updated slightly! Top Level comments must be **Job Opportunities.** Please include **Location** or any other...
Stream Iphone camera to flask website?
I'm trying to find a way to use the Iphone camera as video input for some object recognition I wrote in Python. I thought I'd might be able to do it using a flask website. Has anyone tried anything similar or is it even possible?
/r/flask
https://redd.it/8c0650
I'm trying to find a way to use the Iphone camera as video input for some object recognition I wrote in Python. I thought I'd might be able to do it using a flask website. Has anyone tried anything similar or is it even possible?
/r/flask
https://redd.it/8c0650
reddit
Stream Iphone camera to flask website? • r/flask
I'm trying to find a way to use the Iphone camera as video input for some object recognition I wrote in Python. I thought I'd might be able to do...
pythonhearted. feel free to get the high resolution image from github and use it any for personal needs.
/r/Python
https://redd.it/8bxtre
/r/Python
https://redd.it/8bxtre
Flask 1.0 soon?
It looks like all the items have been checked in the 1.0 milestone. Any word on 1.0?
https://github.com/pallets/flask/milestone/2
/r/flask
https://redd.it/8bzt02
It looks like all the items have been checked in the 1.0 milestone. Any word on 1.0?
https://github.com/pallets/flask/milestone/2
/r/flask
https://redd.it/8bzt02
GitHub
pallets/flask
flask - The Python micro framework for building web applications.
Django Deployment on Ubuntu 16.04 with web server Nginx - Permission Denied Error
I am trying to deploy a django website on a Ubuntu 16.04 system using nginx but I am having issues.
**ERRORS**
Error I get from my nginx `error.log` file:
connect() to unix:/home/teddycrepineau/contoursandcolors/contoursandcolors.sock failed (13: Permission denied) while connecting to upstream, client: 64.125.191.37, server: 173.255.210.63, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:/home/teddycrepineau/contoursandcolors/contoursandcolors.sock:", host: "173.255.210.63", referrer: "http://173.255.210.63/"
Status of `uwgsi`:
$ uwsgi status
uwsgi[25361]: thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi[25361]: uwsgi socket 0 bound to UNIX address /home/teddycrepineau/contoursandcolors/contoursandcolors.sock fd 3
uwsgi[25361]: Python version: 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]
uwsgi[25361]: !!! Python Home is not a directory: /home/teddycrepineau/Env/contoursandcolors !!!
uwsgi[25361]: Set PythonHome to /home/teddycrepineau/Env/contoursandcolors
uwsgi[25361]: Fatal Python error: Py_Initialize: Unable to get the locale encoding
uwsgi[25361]: ImportError: No module named 'encodings'
uwsgi[25361]: Current thread 0x00007f0ec8429700 (most recent call first):
uwsgi[25361]: Thu Apr 12 13:31:57 2018 - [emperor] curse the uwsgi instance contoursandcolors.ini (pid: 4955)
uwsgi[25361]: Thu Apr 12 13:32:00 2018 - [emperor] removed uwsgi instance contoursandcolors.ini
**SET UP**
* Using Python 3
* Ubuntu 16.04
* Using Virtualenvwrapper and virtualenv
Virtualenvwrapper set up
echo "export WORKON_HOME=~/Env" >> ~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
`/etc/uwsgi/sites/contoursandcolors.ini`:
[uwsgi]
project = contoursandcolors
uid = teddycrepineau
base = /home/%(uid)
chdir = %(base)/%(project)
home = %(base)/Env/%(project)
module = %(project).wsgi:application
master = true
processes = 2
socket = %(base)/%(project)/%(project).sock
chmod-socket = 664
vacuum = true
`/etc/nginx/sites-available/contoursandcolor`:
server {
listen 80;
server_name 173.255.210.63;
location = /favicon.io { access_log off; log_not_found off; }
location /static/ {
root /home/teddycrepineau/contoursandcolors;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/home/teddycrepineau/contoursandcolors/contoursandcolors.sock;
}
}
`/etc/systemd/system/uwsgi.service`:
[Unit]
Description=uWSGI Emperor service
[Service]
ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown teddycrepineau:www-data /run/uwsgi'
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
**WHAT I'VE TRIED**
* Changed default python version from 2.7 to 3.5
* Change socket file location from project to run (get me a file not found error)
* I looked at quite a few StackExchange posts, but none have resolved my issue thus far
From what I read, my issue may be related to virtualenv location set up. Where should I go from here?
/r/django
https://redd.it/8bwxg3
I am trying to deploy a django website on a Ubuntu 16.04 system using nginx but I am having issues.
**ERRORS**
Error I get from my nginx `error.log` file:
connect() to unix:/home/teddycrepineau/contoursandcolors/contoursandcolors.sock failed (13: Permission denied) while connecting to upstream, client: 64.125.191.37, server: 173.255.210.63, request: "GET /favicon.ico HTTP/1.1", upstream: "uwsgi://unix:/home/teddycrepineau/contoursandcolors/contoursandcolors.sock:", host: "173.255.210.63", referrer: "http://173.255.210.63/"
Status of `uwgsi`:
$ uwsgi status
uwsgi[25361]: thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi[25361]: uwsgi socket 0 bound to UNIX address /home/teddycrepineau/contoursandcolors/contoursandcolors.sock fd 3
uwsgi[25361]: Python version: 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609]
uwsgi[25361]: !!! Python Home is not a directory: /home/teddycrepineau/Env/contoursandcolors !!!
uwsgi[25361]: Set PythonHome to /home/teddycrepineau/Env/contoursandcolors
uwsgi[25361]: Fatal Python error: Py_Initialize: Unable to get the locale encoding
uwsgi[25361]: ImportError: No module named 'encodings'
uwsgi[25361]: Current thread 0x00007f0ec8429700 (most recent call first):
uwsgi[25361]: Thu Apr 12 13:31:57 2018 - [emperor] curse the uwsgi instance contoursandcolors.ini (pid: 4955)
uwsgi[25361]: Thu Apr 12 13:32:00 2018 - [emperor] removed uwsgi instance contoursandcolors.ini
**SET UP**
* Using Python 3
* Ubuntu 16.04
* Using Virtualenvwrapper and virtualenv
Virtualenvwrapper set up
echo "export WORKON_HOME=~/Env" >> ~/.bashrc
echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
`/etc/uwsgi/sites/contoursandcolors.ini`:
[uwsgi]
project = contoursandcolors
uid = teddycrepineau
base = /home/%(uid)
chdir = %(base)/%(project)
home = %(base)/Env/%(project)
module = %(project).wsgi:application
master = true
processes = 2
socket = %(base)/%(project)/%(project).sock
chmod-socket = 664
vacuum = true
`/etc/nginx/sites-available/contoursandcolor`:
server {
listen 80;
server_name 173.255.210.63;
location = /favicon.io { access_log off; log_not_found off; }
location /static/ {
root /home/teddycrepineau/contoursandcolors;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/home/teddycrepineau/contoursandcolors/contoursandcolors.sock;
}
}
`/etc/systemd/system/uwsgi.service`:
[Unit]
Description=uWSGI Emperor service
[Service]
ExecStartPre=/bin/bash -c 'mkdir -p /run/uwsgi; chown teddycrepineau:www-data /run/uwsgi'
ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
[Install]
WantedBy=multi-user.target
**WHAT I'VE TRIED**
* Changed default python version from 2.7 to 3.5
* Change socket file location from project to run (get me a file not found error)
* I looked at quite a few StackExchange posts, but none have resolved my issue thus far
From what I read, my issue may be related to virtualenv location set up. Where should I go from here?
/r/django
https://redd.it/8bwxg3
reddit
Django Deployment on Ubuntu 16.04 with web server Nginx... • r/django
I am trying to deploy a django website on a Ubuntu 16.04 system using nginx but I am having issues. **ERRORS** Error I get from my nginx...
How to add paypal checkout to a django-oscar project?
[django-oscar-paypal](https://github.com/django-oscar/django-oscar-paypal) is not maintained. How to add paypal support to a django-oscar project? Any library recommendation?
Thanks for your help!
/r/django
https://redd.it/8bu004
[django-oscar-paypal](https://github.com/django-oscar/django-oscar-paypal) is not maintained. How to add paypal support to a django-oscar project? Any library recommendation?
Thanks for your help!
/r/django
https://redd.it/8bu004
GitHub
GitHub - django-oscar/django-oscar-paypal: PayPal integration for django-oscar. Can be used without Oscar too.
PayPal integration for django-oscar. Can be used without Oscar too. - django-oscar/django-oscar-paypal