Questions tagged [pylons]
Pylons is a lightweight web framework emphasizing flexibility and rapid development.
830
questions
0
votes
0
answers
27
views
How can i display video from VCAM-AR1335B (daA4200-30mci) using GStreamer?
I must to get video from VCAM-AR1335B (daA4200-30mci) by using GStreamer in owr Yocto distro, but when i try to execute follow command "gst-launch-1.0 v4l2src device=/dev/video1 ! videoconvert ! ...
0
votes
0
answers
23
views
Pylon emulated camera doesn't recognise custom image
I have been using the pylon Camera Software Suite to emulate a camera. I'm wanting to display custom test images and have used the pylon documentation provided:
camera.TestImageSelector.SetValue(...
0
votes
1
answer
67
views
Pylon Camera Emulator Issue: No device is available
I'm trying to use Pylon to emulate a camera. I've used the 'Pylon_with_OpenCV.cpp' code provided by Basler which should enable me to acquire and display images.
However, when I run my ROS node, it ...
0
votes
1
answer
129
views
In Pylon C# How to Change frameMode to Trigger?
i want to grab image only when get trigger signal so i have to change basler camera's frameMode to Trigger mode
hDev = Pylon.CreateDeviceByIndex((uint)0);
Pylon.DeviceFeatureFromString(...
1
vote
1
answer
50
views
Formatting the time slot of a Pylon's deform.widget.DateTimeInputWidget
Needs
I need to customize a deform.widget.DateTimeInputWidget, especially to get rid of the seconds in the input time slot so that the user doesn't need to specify them. By default seconds have to be ...
1
vote
0
answers
637
views
CKAN Error: Process completed but unable to post to result_url
I'm using CKAN 2.9.4 when I click Upload to DataStore button, I got this error
Error: Process completed but unable to post to result_url
My ckan system is already running at
http://mindset.ccgeo.info:...
1
vote
0
answers
266
views
How to mock an authentication decorator with Pytest?
I am going to mock an authentication decorator with Pytest. The framework is Pylons.
Can you please let me know if you have any experience?
Please help me! It's very important to me.
api.py
@...
1
vote
0
answers
118
views
How to validate one key based on another in Colander Python?
I am using Colander for validation, and would like to validate one key based on another.
e.g:
I would like to validate field value based on entity value:
class ValidationSchema(Validator.MappingSchema)...
1
vote
1
answer
440
views
What is this ZopeTransactionEvents error with SQLAlchemy while updating a Pyramid application?
I'm updating Pyramid/SQLAlchemy legacy code to Python 3.8 from an app working fine under Python 2.7, and running it locally. All the necessary requirements are pip installed and setup.py runs without ...
0
votes
1
answer
283
views
How to set a timeout to terminate nginx workers?
I would like to set a duration for Nginx to terminate the workers after the timeout. I am looking for a feature like "Ping Maximum Response Time" in IIS. I am using uWSGI, Nginx, and Pylons ...
-1
votes
1
answer
73
views
Deserialize Multidict using Colander
On a website I have a <select> element with multiple attribute like so:
<select value="name" multiple>
<option value="willi">Willi</option>
<option ...
0
votes
1
answer
129
views
How to port /{controller}/{action}/{id} routes in Pylons to Pyramid
So I'm porting some old Py2/Pylons app, which has the routes defined as in https://docs.pylonsproject.org/projects/pyramid-cookbook/en/latest/pylons/examples.html section #3 which isn't possible in ...
1
vote
1
answer
540
views
pyramid pserve appears multithreaded (?)
I'm hoping to multithread pyramid 1.10.4 requests ... but it appears that pserve is already multithreaded. The Pyramid docs seems to say pserve is single threaded, but when I put
sleep(10)
in my ...
0
votes
3
answers
951
views
How to customize ckan header site navigation tabs
I would like to add extra header site navigation tabs to the default ones.
I have tried working with the solution given here but it is not working for me. I am getting Exception: menu itemapicannot ...
1
vote
1
answer
232
views
pyramid_mailer `Message` and `Content-Transfer-Encoding`
I'm sending emails with pyramid_mailer and found this weird issue that when I use Office365 as my SMTP server it adds random = characters into my message. I don't get that issue with any other mail ...
0
votes
1
answer
282
views
Pylons Pyramid failing to install
I'm following this tutorial but when I get to the $VENV/bin/pip install "pyramid==1.10.1" waitress it gives me the following error:
Could not find a version that satisfies the requirement pyramid==1....
1
vote
1
answer
55
views
Why tracking number get from resource API is different from the tracking number recorded in database?
I used resource_show in CKAN 2.7.3 API docs to get metadata from specific resources. In my tracking_summary table, I have some resource which has tracking number larger than 0. However, when I use ...
1
vote
0
answers
26
views
In pylons how do I force user to download a file?
From a pylon controller action, instead of rendering a template, I want to send a file to the user to download. In languages like PHP, I can do the this thing like following. How can I do this in ...
2
votes
1
answer
681
views
Python Pylons/Pyramid Cookies
What is the best way to set and get cookies in pylons/pyramid?
Response.set_cookie('example_cookie_name', 'example', max_age=180*24*3600)
returns the error
File "/usr/local/lib/python3.5/dist-...
1
vote
2
answers
2k
views
Make exe file of python pypylon project using pyinstaller spec file
In my python project, I used Basler GigE Vision ethernet cameras, because of the pylon doesn't support python then I used pypylon.pylon wrapper to open it in python. This is my class to open the ...
0
votes
1
answer
768
views
CKAN - Custom Dataset/Resource Fields
I am following this tutorial concerning adding custom dataset/resource fields for CKAN: http://docs.ckan.org/en/latest/extensions/adding-custom-fields.html
I have successfully added custom fields for ...
0
votes
1
answer
223
views
CKAN Project - Web Framework
Quick question. What web-app framework is CKAN using? I saw Pylons but that project is now deprecated for Pyramid. Can anyone shed some light on this?
Additionally, what framework does CKAN use to ...
0
votes
1
answer
28
views
Pylons logging for 500 after failed shell call in view
I am new to pylons and I want a web page to request and process JSON that is emitted by a perl script on the server. This isn't working as below but I can find no logs for either errors or requests ...
0
votes
1
answer
168
views
Where is the Salt key in a Pylons/Pyramid app?
I have a legacy 2010 Pylons app I want to replace with a newer Django one.
In Django, it is my understanding that the Salt that is used in hashing passwords is the SECRET_KEY in the config file. ...
1
vote
1
answer
55
views
Pylons routing, what is the location attribute?
I'm looking at the reddit source code and ran into a route that looks like the following:
mc('/prefs/:location', controller='forms', action='prefs', location='options')
Searching the documentation ...
0
votes
2
answers
110
views
How to put sessions on all pages without putting the session code on all views in pyramid?
I think my problem is related on the way I structured my pyramid project.
What I want to accomplish is to make my code runs on all views, I don't want to paste same codes on all views. Its like I will ...
0
votes
1
answer
77
views
Websauna threading runtime signal error with pdb.set_trace()
I want to debug the runtime of a websauna app, so I set a
pdb.set_trace()
in
system/admin/views.py:87 like so,
@view_config(context=ModelAdmin.Resource, name="show", renderer="crud/show.html", ...
1
vote
1
answer
507
views
Markers on the Line
I have a list of lists consisting of two different data for plotting 2 lines and another list of lists consisting of markers on these respective lines. but the list of list of markers can have empty ...
1
vote
0
answers
266
views
Mako: How to access loop variable in tag?
I cannot figure out how to access the loop variable blog_post_uri inside a tag so that I can dynamically load content defined in another template.
% for blog_post_uri in blog_post_uris:
<div ...
0
votes
0
answers
41
views
Pyramid + pserve occasional delay in response
I'm running a pyramid web server. 99% of the time it works great. However randomly, as I try to reach an URL, the request just waits a random amount of time, a few seconds to a few dozens of seconds, ...
2
votes
1
answer
70
views
How do I upgrade from a previous version of websauna?
I have a websauna project which I created using this command:
pip install -e "git+https://github.com/websauna/websauna.git@master#egg=websauna[celery,utils,notebook]"
this is found in the ...
2
votes
2
answers
557
views
Checking CSRF with multiple gunicorn workers in Pyramid
I'm using Pyramids for my web app, which requires an csrf check for each request. During ajax-calls the csrf-token is set into the header for each request. Everything works fine for 1 thread with 1 ...
64
votes
5
answers
71k
views
sqlalchemy existing database query
I am using SQLAlchemy as ORM for a python project. I have created few models/schema and it is working fine. Now I need to query a existing MySQL database, no insert/update just the select statement.
...
2
votes
1
answer
83
views
pyramid.util.Request source code
I'm new to Python and I am studying Pyramid to learn how to write good code. I wrote this root factory code:
class RootFactory(object):
def __acl__(self):
return [
(Allow, '...
1
vote
1
answer
1k
views
Pyramid pserve.exe syntax error
I have created a pyramid application using pcreate, now when I try to run it using pserve with --reload, I get following error
SyntaxError: Non-ASCII character '\x90' in file <path>\pserve.exe ...
3
votes
3
answers
576
views
Pyramid debug toolbar serving static content over HTTP instead of HTTPS
On our test servers, we're using the Pyramid debug toolbar, however, it generates http:// links to static content (like its CSS and JavaScript files), while the rest of the content is served over ...
3
votes
2
answers
177
views
Trying to make a development instance for a Python pyramid project
So I have this Python pyramid-based application, and my development workflow has basically just been to upload changed files directly to the production area.
Coming close to launch, and obviously ...
1
vote
0
answers
134
views
Running Pyramid app in Jython + pserve (waitress)
I installed Pyramid, SQLAlchemy and waitress running in virtualenv on Jython 2.7 (platform: Linux x64). Unfortunately pserve cannot start:
% pserve development.ini
Traceback (most recent call last):
...
-1
votes
2
answers
123
views
pylon pyramid class function definition indentation
Going through the documentation of pylon project wiki2 tutorial found this codes and What I know is a class has a function definition defined with indentation after class declaration. Checked the ...
1
vote
1
answer
250
views
Disabling logging in 'transaction' package (Pyramid app)
When debugging level of main logger in Pyramid app is set to DEBUG, transaction is spewing lots of pointless debug messages.
In Nosetests I can disable that this way:
from transaction._compat import ...
2
votes
0
answers
791
views
UndefinedError: 'pyramid.util.Request object' has no attribute 'user'
I am doing a simple authentication in python pyramid here is the security.py where am doing the authentication part.
security.py
from pyramid.authentication import AuthTktAuthenticationPolicy
from ...
0
votes
2
answers
208
views
Redirecting to a cutted URL in Pyramid
I got an URL like: http://localhost:4284/?session_expired=true
Now I'm sending and AJAX-Request for something and the return should be a HTTPFound with 'http://localhost:4284/'.
Cutting the URL is not ...
1
vote
1
answer
584
views
Logging to SQLAlchemy logger in Pyramid app
I have defined SQA logger in development.ini to log SQA queries to a separate file like this:
[handler_sqa]
class = FileHandler
args = ('%(here)s/log/sqlalchemy.log','a')
# "level = INFO" logs SQL ...
-1
votes
1
answer
539
views
Which I must learn? Pylons vs Pyramid? [closed]
Which framework is better pyramid vs pylons? what similarities do they have? which of them must I learn. I learn django actively and I want to learn pyramid or pylons also.
0
votes
1
answer
111
views
Apache 2.4 proxy requests to web app not working
We migrated our web hosting to a newer server running Apache 2.4.6, Plesk 12.5, and CentOS7.2. The web app is written in the Python Pylons framework. It utilizes paster to serve the web application. I ...
1
vote
2
answers
162
views
Migrated web server to newer OS and Python version cant get Pylons web app to run
We migrated our hosted web server from an older centos 5.5, apache 2.2, python 2.5 or 2.6 to latest version centos, apache 2.4, python 2.7. Our main web app was written in pylons with python 2.6. And ...
-1
votes
1
answer
73
views
not able to get list of all models in a pyramid project
I am trying to write admin console for my pyramid project.
I am trying to get a list of all classes defined in models. Is there any way to get these?
3
votes
3
answers
1k
views
How to add your app specific settings in pyramid rest framework?
I am new to pyramid.
The Issue is I am not able to figure out how app specific settings (key value pairs) work in pyramid.
This is what I have done after various google searches and other ...
1
vote
1
answer
496
views
Dynamic forms with deform
Making form with deform and whould like to change the pageShema class depending on the choices made by the user.
Ex. if he selects option 1 from selectwidget, show him one set of fields, if case of ...
1
vote
1
answer
231
views
SQLAlchemy Core inserts make (Pyramid) scoped session hanging
I have lots of child objects to add to a parent SQA object, sometimes 10,000 or so. The code runs in Pyramid app, which makes use of scoped session and ZopeTransactionExtension:
DBSession = ...