Code: 403 when creating a new task

I am encountering the following error when trying to create a new task with a shared volume:
Code: 403. Message: {"detail":"You do not have permission to perform this action."}

Couldn't find any mentions of this error in the issues, any advice would be much appreciated
Thanks!

@edrdos101
How did you create this account? Probably you don't have permission for task creating.
You need to create a superuser account and than you can create other accounts (via default registration) and entitle them by the superuser account.

@edrdos101 , your user doesn't have enough privileges to create a task. Please read our documentation. You need to assign additional rights. The question was discussed many times on our gitter channel. I will close the issue for now. We definitely need better messages about errors but it is a separate issue.

For anyone else encountering this problem - the fix is really easy, but it's not stated anywhere in the "User Guide" (as of February 24th 2021). Only a user assigned an admin role in the Django administration panel can create new tasks. Log in as a superuser and assign it properly. Hope that helps :)

@AeolusTech

Only a user assigned an admin role

It is not exactly true. CVAT has different user groups: admins, users, annotators, observers.
Tasks can be created by a user who belongs to one admins or users.

Thank you for a very quick reply, Boris! I am just starting with CVAT

I'm using CVAT online tool, I created a project for my organization, But it is showing a warning message that you can add a project, you want permission. actually, where do I find this permission access to allow. Are there any other methods to add projects to organization?
Note: I use admin account and im on the one user for this account.

@shajahanpc , if you are using cvat.org, you can have only "user" permissions. Users can create 3 projects and 10 tasks on the public instance (see the scope create in csv tables below).
https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/iam/rules/projects.csv
https://github.com/openvinotoolkit/cvat/blob/develop/cvat/apps/iam/rules/tasks.csv
There are two possible options:

We can assign business permissions to your account on cvat.org temporary. To do that we need strong reasons. Please send us information about how you are using cvat.org inside your organization. Also please share information about your organization and needs.
You can setup your local CVAT instance.


Affectability

Good evening! Lovely POc, worked great on a few operating systems. Was curious, though , is there any reasons why it would not work on an Windows 7 SP1 x64 OS despite having any older version then the software update? Appears to fail on allocating a null page, or
Offset_KThread_ApcStateFill_Process
is there anyway I may be able to fix this?
appreciate the response =)

Nothing I code works for Windows 7 so I'm not surprised tbh lol, that being said I don't see why it shouldn't work.
Offset_KThread__ApcStateFill__Process shouldn't fail considering the pattern is practically the same
.text:00000001400818B0                                               public PsGetCurrentProcess
.text:00000001400818B0                               PsGetCurrentProcess proc near
.text:00000001400818B0 65 48 8B 04 25 88 01 00 00                    mov     rax, gs:188h    ; IoGetCurrentProcess
.text:00000001400818B9 48 8B 40 70                                   mov     rax, [rax+70h]
.text:00000001400818BD C3                                            retn
.text:00000001400818BD                               PsGetCurrentProcess endp

Does Offset_KThread__ApcStateFill__Process stay 0?
Also what do you mean by the null page allocation? AllocateLockedMemoryForKernel?
Do you get a bugcheck when you try it?

Discovered the problem while doing something completely unrelated, rdgsbase / wrgsbase is not supported in Windows 7 so this exploit will not work unless you overwrite TEB instead.

I did not get a bugcheck ,and yes the Offset_kThread does remain at 0 unfortunately. All good, thanks at least for the response mate, take care @can1357


WIP: windows fixes for refresh, line numbers

attempt to fix #7, #9
changed the running of mocha to fork and not be in-process. It works on my test machine. need more testing before merging
need to test in ubuntu

Works in ubuntu

I also fixed the line thingy for Windows  so hopefully it will work on every platform if you have a time merge it
if it's not hard take my fix coz in using it for the inside code results notifications
Tks 😄

merged manually


gtx 1050ti rog mining problem

ETH: 1 pool is specified
Main Ethereum pool is eu1-etc.ethermine.org:4444
DCR: 0 pool is specified
No AMD cards in the list.
Driver 368.81 is recommended for best performance and compatibility
Be careful with overclocking, use default clocks for first tests
Press "s" for current statistics, "0".."9" to turn on/off cards
CUDA initializing...
NVIDIA Cards available: 1
CUDA Driver Version/Runtime Version: 9.2/6.5
GPU #0: GeForce GTX 1050 Ti, 4096 MB available, 6 compute units, capability: 6.1
Total cards: 1
ETH: Stratum - connecting to 'eu1-etc.ethermine.org' <<IP_ADDRESS>> port 4444
ETH: Stratum - Connected (eu1-etc.ethermine.org:4444)
No pool specified for Decred! Ethereum-only mining mode is enabled
ETH: Authorized
ETHEREUM-ONLY MINING MODE ENABLED (-mode 1)
ETH: eth-proxy stratum mode
Watchdog enabled
Remote management is enabled on port 3333
ETH: Cannot find seed that was received from pool!
Setting epoch failed.
ETH: Cannot find seed that was received from pool!
Setting epoch failed.
ETH: 12/11/18-16:34:38 - New job from eu1-etc.ethermine.org:4444
ETH - Total Speed: 0.000 Mh/s, Total Shares: 0, Rejected: 0, Time: 00:00
ETH: GPU0 0.000 Mh/s
ETH: 12/11/18-16:34:50 - New job from eu1-etc.ethermine.org:4444
ETH - Total Speed: 0.000 Mh/s, Total Shares: 0, Rejected: 0, Time: 00:00
ETH: GPU0 0.000 Mh/s
ETH: 12/11/18-16:34:52 - New job from eu1-etc.ethermine.org:4444
ETH - Total Speed: 0.000 Mh/s, Total Shares: 0, Rejected: 0, Time: 00:00
ETH: GPU0 0.000 Mh/s
GPU0 t=26C fan=100%
WATCHDOG: GPU error, you need to restart miner :(
Restarting OK, exit...
what is this help
pls i dont know

what is wrong w the gpu?

 If it is a non-tensorflow related, request you to raise in the respective repository.


update(kernels): updated kernel json lists.

Signed-off-by: GitHub<EMAIL_ADDRESS>
What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind documentation

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area crawler

/area ci

/area utils

What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

@FedeDP: The label(s) kind/documentation cannot be applied, because the repository doesn't have them.

In response to this:

Signed-off-by: GitHub<EMAIL_ADDRESS>What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind documentation

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area crawler

/area ci

/area utils

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, maxgio92
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP,maxgio92]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


[Feature Request] Add branch number to commit name

💭 Describe the feature
Thanks for the development of the project!
I need to add the branch name to the commit name. Is it possible to automate the process of inserting a branch name into a commit by introducing a new parameter.
Example of a commit name after adding feat(infrastructure) functionality: [PREMPROD-30287] Refine git branch detection by mask
Thanks in advance!
💡 Proposed Solution
No response

Sorry for the delayed response.
First, this commit message does not comply with the Conventional Commits specification, so it will not be included as a feature.

However, it can be completed with full custom configuration:
https://cz-git.qbb.sh/config/engineer#formatmessagecb
https://cz-git.qbb.sh/recipes/default-issues

Does functionality correspond to feat?
Can [PREMPROD-30287] be obtained from, for example, the branch name?

// commitlint.config.cjs
const { execSync } = require('node:child_process')

const issue = execSync('git rev-parse --abbrev-ref HEAD')
    .toString()
    .trim()
    .split('_')?.[1] || '0'

const mapping = (type) => {
    const removeAnsi = type.replace(/\x1b\[[0-9;]*m/g, '')
    return {
        feat: 'functionality',
    }[removeAnsi]
}

const pusher = execSync('git config user.name || true').toString().trim()

/** @type {import('czg').UserConfig} */
module.exports = {
    prompt: {
        scopes: ['infrastructure'],
        customScopesAlign: 'bottom',
        skipQuestions: ['body', 'breaking'],
        allowCustomIssuePrefix: false,
        allowEmptyIssuePrefix: false,
        issuePrefixes: ['by'],
        defaultIssues: pusher,
        messages: {
            footer: 'The author of this commit is:\n',
        },
        formatMessageCB: ({ type, scope, subject, footer }) => {
            // console.log(type)
            return `${type}(${scope}) ${mapping(type)}: [PREMPROD-${issue}] ${subject} by ${footer.trim()}`
        },
    },
}

Using formatMessageCB, you can create any commit message format you want.The information can be obtained from the command or Node library in the JS file.


Code fonts have different sizes

One thing we didn't consider when doing https://github.com/sindresorhus/refined-github/issues/179 is that code fonts have different default sizes. I got Ubuntu Mono, which is a lot smaller than the default font.
With refined-github

## Without

What do we do about this?

Am I wrong to think this is expected behavior? I expect the font's character dimensions to be different when using a different font. In other words, of course Ubuntu Mono in 12px is not going to be the exact same size as 'Menloin the same12px`, and that's (part of) the point of different fonts.
If you want to have different sizes for different fonts to sort of "balance" them out, here are some possibly helpful links I googled (we seem to be getting into JS-font detection...):
http://stackoverflow.com/questions/3555962/css-different-font-sizes-on-different-families (Relevant: http://caniuse.com/#feat=font-size-adjust)
https://css-tricks.com/forums/topic/specifying-different-font-size-for-different-fonts-in-a-font-family/
http://stackoverflow.com/questions/11023107/specifying-different-font-sizes-for-different-font-families

I also think font is a subjective choice so it would be nice to be able to choose between Menlo and Ubuntu Mono [and potentially others].

Closing this as a consequence of #575
Continue here: https://github.com/sindresorhus/module-requests/issues/97


Mapped.csv miR does not equel to miR.Counts.csv

I run miRge3.0 on 4 small datasets. I found the miR.Counts.csv results does not equel to mapped.csv results, as showed below

the count num in the last sample is not the sum of counts in mapped results, while the other three samples are.
Then I look into other miR results, the problem seems to be widespread.
How to explain this difference?

It seems that --crThreshold parameter do deal with this problem.
I wonder how to determine its prefered value.

Hi @ray1919,
You are right about --crThreshold, you can increase that up to 0.5 (default set to 0.1), however, this won't make much difference, as we would anticipate inaccurate counts if we do not account for canonical miRNA reads. As you may see in the last sample (NWZ_0661) the reads for miR-3200-3p maps to isomiRs (column: isomiR miRNA) and none to the canonical miRNAs (column: exact miRNA).
These low depth read counts introduce erroneous counts which in the biological space could be the result of erroneous bases (sequencing error) at the ends of the reads or the presence of low abundant reads for miR-3200-3p. This could also be the result of the incorrect adapter sequence used while trimming. Furthermore, we have set minimum reads to call exact miRNA (canonical miRNA) is at least 2 reads (This can't be adjusted).
To summarize, we must have at least two reads to canonical (exact miRNAs) to account for miR.Counts and miR.RPM values.  Further, the threshold value works only if we have both canonical and isomiRs reads. I hope this is clear. Please let us know if you need any further information.
Thank you,
Arun.


AWS SSM (parameter store) sync by path

Feature Request
Correct me if I am wrong, but it would appear that it is currently not possible to sync from AWS SSM parameter store based on the path. Is this on the roadmap? Often its useful to take a path and translate parameters under these paths to env variables. Could we get this on the roadmap?
I specifically meaning syncing all parameters recursively below a path i.e. using aws ssm get-parameters-by-path and setting those to appropriately named env vars? i.e. uppercase, underscores, etc
I guess it would mean implementing sync
https://github.com/tellerops/teller/blob/bdea7e096c4319a27d5a26187f08bfac8fe32f76/pkg/providers/aws_ssm.go#L77

yes it is, happy to jump on a zoom session with you some time next week, and learn about your use case. would that make sense for you?

@jondot I am not sure that would be required in this instance. To me it's a fairly simple issue to overcome, we are talking here about simply adding the ability for AWS SSM parameter store parameters to be looked up by partial path. i.e. /dev/ which would translate anything discovered by the final segment of the /dev/var1 /dev/platform/var2 etc into env vars.
I believe you are calling this feature sync

should be resolved now via Teller 2.0 reimplementation of AWS SSM, thanks!


Getting "path must be a string or Buffer" error on Ubuntu

Hi,
Im getting the following error when trying to build my nextjs app with the inline svg plugin:
"Module build failed: TypeError: /var/www/path/path/path/component.js: path must be a string or Buffer"
When I try the same thing in a Mac everything works fine.... only under Ubuntu do I get this error.
Any ideas?
Thanks!

Maybe a case sensitive thing? Try adding caseSensitive to the options to sanity-check that.

I'm getting the same problem and I'm on OSX.  It started showing up when trying to change the path of one of the SVGs I'm using.  I'm also seeing really weird caching issues, like editing the SVG files and not seeing them update in my bundle...
The caseSensitive option didn't work for me.  I think this issue should be reopened.


Support null fromViewUid in viewport-projection tracks

Description

What was changed in this pull request?

This pull request modifies the viewport-projection-* tracks to add support for null fromViewUid values. Instead, coordinates for the new initialXDomain and initialYDomain track properties can be provided to define the interval. When the d3-brush selection rect is moved, the values of initialXDomain and initialYDomain  in the viewConfig are updated, just like they are for the initialXDomain and initialYDomain values in view objects, and trigger the .on('viewConfig') event.

Why is it necessary?

We are using the viewport-projection-horizontal in the cistrome wrapper component to enable selection of genomic intervals. However, we do not need to display a second view from which the domain for the tracks are linked.
Checklist

[ ] Set proper GitHub labels (e.g. v1.6+, ignore if you don't know)
[x] Unit tests added or updated
[x] Documentation added or updated
[ ] Example(s) added or updated
[x] Update schema.json if there are changes to the viewconf JSON structure format
[x] Screenshot for visual changes (e.g. new tracks or UI changes)
[x] Updated CHANGELOG.md

Screenshot

I have the following use case for projectionMarginTop, and added the others for symmetry.
When using the viewport-projection-horizontal, I want to be able to put the track in the whole track position, and then prevent the brushing rect from covering a top horizontal-chromosome-labels track. If the horizontal-chromosome-labels track height is 30, I can set projectionMarginTop to 30 to do this.

I have the following use case for projectionMarginTop, and added the others for symmetry.
When using the viewport-projection-horizontal, I want to be able to put the track in the whole track position, and then prevent the brushing rect from covering a top horizontal-chromosome-labels track. If the horizontal-chromosome-labels track height is 30, I can set projectionMarginTop to 30 to do this.

Hmmm... I'm not sure I get this entirely. If you add a margin to a viewport projection, then it's not showing the true viewport?
Also, which track are you putting in the 'whole' position?

If you look at the screenshot: the red viewport-projection-horizontal track is in the "whole" position. But notice how it is not covering the topmost chromosome labels. That is because it has projectionMarginTop = 30.
Also note that:

viewport-projection-horizontal does not use projectionMarginLeft or projectionMarginRight
viewport-projection-vertical does not use projectionMarginTop or projectionMarginBottom
viewport-projection-center does not use any of the margin options

Does it have a bottom margin as well? Since it doesn't reach the bottom?
I guess I'm just concerned that this is adding an option that fixes a symptom but leaves the underlying problem unsolved.
The problem, as I understand it, is that you want the viewport projection to cover only some of the tracks. The solution implements that if you only want to leave the top track uncovered but fails if you'd like to leave middle tracks uncovered. Maybe take a look at how overlay tracks are implemented (http://docs.higlass.io/view_config.html#overlay-tracks) and see if a similar approach might not work here.
If my diagnosis is correct, then I would recommend breaking this PR up into two parts:

Support null in the fromViewUid - this we can merge right away
Adding support for selective track covering - this we can continue discussing

Ok that is a good idea. I will remove the projectionMargin stuff from this PR


No output issue

Hi. We are getting from time to time the following issue
Running workflow
got prompt
Executing node 16, title: Load Image, class type: LoadImage
Executing node 54, title: Width and height for scaling image to ideal resolution 🪴, class type: Width and height for scaling image to ideal resolution 🪴
Executing node 55, title: 🔧 Image Resize, class type: ImageResize+
model_path is /src/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints/depth_anything_vitl14.pth
Executing node 51, title: AIO Aux Preprocessor, class type: AIO_Preprocessor
using MLP layer as FFN
!!! Exception during processing !!! PytorchStreamReader failed reading zip archive: failed finding central directory
Traceback (most recent call last):
File "/src/ComfyUI/execution.py", line 316, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/src/ComfyUI/execution.py", line 191, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/src/ComfyUI/execution.py", line 168, in _map_node_over_list
process_inputs(input_dict, i)
File "/src/ComfyUI/execution.py", line 157, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/src/ComfyUI/custom_nodes/comfyui_controlnet_aux/init.py", line 117, in execute
return getattr(aux_class(), aux_class.FUNCTION)(**params)
File "/src/ComfyUI/custom_nodes/comfyui_controlnet_aux/node_wrappers/depth_anything.py", line 19, in execute
model = DepthAnythingDetector.from_pretrained(filename=ckpt_name).to(model_management.get_torch_device())
File "/src/ComfyUI/custom_nodes/comfyui_controlnet_aux/src/controlnet_aux/depth_anything/init.py", line 42, in from_pretrained
model.load_state_dict(torch.load(model_path, map_location="cpu"))
File "/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/serialization.py", line 1072, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/serialization.py", line 480, in init
super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory
Prompt executed in 3.19 seconds
outputs:  {}

Do you have an example of the zip you used with this?

I'm not sure of the exact cause but I've added some changes which should help:

If the cause was corrupted depth anything weights, I've shifted downloads for this into setup to avoid that happening
Errors are now reported, so the prediction will error out rather than return success with no outputs


Firmware which is currently shipping on the Opsis

These changes do the following;

Adding lm32 firmware for dumping the TOFE EEPROM (using I2C).
Adding lm32 control over fx2 reset.

Support loading the fx2 firmware from the lm32/FPGA via a second stage I2C bootloader. This is based on the work @fallen did.
Adding the ixo-usb-jtag firmware embedded in the lm32 firmware.

The code which puts the microload contents into the Opsis EEPROM and generates the c files is available in a branch of the HDMI2USB-mode-switch tool -- it needs clean up and probably moving to it's own repo. There are currently tools for working with TOFE EEPROMs available there too.

I'm merging this to work on the firmware/gateware.


'qcluster' doesn't stop with Control+C

Thank you for taking over maintaining this project! I'm really enjoying having an alternative to Celery to play with, and my end goal is a simple containerised setup where I have a worker container running django-q2 alongside a server container handling web requests.
I'm struggling a bit to develop with django-q though because of this issue, whereby the qcluster command appears to self-heal instead of gracefully exiting upon receiving a KeyboardInterrupt/Control+C message. This results in terminal windows which just need to be closed and set up again, and containers which keep restarting themselves even when told to stop.
My logs for such a cluster running without tasks look like:

python manage.py qcluster -v 3
20:21:26 [Q] INFO Q Cluster twelve-vermont-ack-winner starting.
20:21:27 [Q] INFO Process-1 guarding cluster twelve-vermont-ack-winner
20:21:27 [Q] INFO Q Cluster twelve-vermont-ack-winner running.
20:21:28 [Q] INFO Process-1:9 monitoring at 16640
20:21:28 [Q] INFO Process-1:1 ready for work at 18196
20:21:28 [Q] INFO Process-1:5 ready for work at 288
20:21:28 [Q] INFO Process-1:7 ready for work at 12476
20:21:28 [Q] INFO Process-1:4 ready for work at 9580
20:21:28 [Q] INFO Process-1:2 ready for work at 7452
20:21:28 [Q] INFO Process-1:6 ready for work at 3120
20:21:28 [Q] INFO Process-1:3 ready for work at 4484
20:21:28 [Q] INFO Process-1:10 pushing tasks at 9376
20:21:28 [Q] INFO Process-1:8 ready for work at 4828
KeyboardInterrupt
KeyboardInterrupt
KeyboardInterrupt
KeyboardInterrupt
KeyboardInterrupt
KeyboardInterrupt
20:25:00 [Q] ERROR reincarnated worker Process-1:5 after death
20:25:00 [Q] ERROR reincarnated pusher Process-1:10 after sudden death
20:25:00 [Q] ERROR reincarnated worker Process-1:1 after death
20:25:00 [Q] ERROR reincarnated worker Process-1:3 after death
20:25:00 [Q] ERROR reincarnated worker Process-1:6 after death
20:25:00 [Q] ERROR reincarnated worker Process-1:8 after death
20:25:00 [Q] ERROR reincarnated monitor Process-1:9 after sudden death
20:25:01 [Q] INFO Process-1:12 pushing tasks at 17868
20:25:01 [Q] INFO Process-1:11 ready for work at 2424
20:25:01 [Q] ERROR reincarnated worker Process-1:2 after death
20:25:01 [Q] ERROR reincarnated worker Process-1:7 after death
20:25:01 [Q] INFO Process-1:13 ready for work at 11524
20:25:01 [Q] INFO Process-1:14 ready for work at 1356
20:25:01 [Q] INFO Process-1:15 ready for work at 15292
20:25:01 [Q] INFO Process-1:17 monitoring at 6928
20:25:01 [Q] INFO Process-1:16 ready for work at 3184
20:25:01 [Q] ERROR reincarnated worker Process-1:4 after death
20:25:02 [Q] INFO Process-1:18 ready for work at 9392
20:25:02 [Q] INFO Process-1:19 ready for work at 5960
20:25:02 [Q] INFO Process-1:20 ready for work at 6156`

Thanks for raising this issue here too!
I am failing to replicate the issue within my setup. How does your containerised setup look like? Have you also tried it with the django-q2 version?
I am using docker-compose and I haven't had any issues with this setup similar to this:
version: '3'

services:
  web:
    restart: always
    command: python manage.py runserver <IP_ADDRESS>:8000
    ports:
      - "<IP_ADDRESS>:8000:8000"
    build: .
    volumes:
      - .:/app

  qcluster:
    restart: always
    command: python manage.py qcluster
    build: .
    volumes:
      - .:/app

Well I just found out Ctrl + Break in Windows Terminal can stop qcluster.
btw on my thinkpad notebook that's a Ctrl + Fn + B

@sinowood - I can confirm that Ctrl + Fn + B works for me locally too, thank you!
It inserts the ^C character, which I guess is handled differently to the KeyboardInterrupt exception. It might be useful to have KeyboardInterrupt handled the same way, since that is how most people will be trying to stop it (you can see the activity on the original thread!) at first; certainly I did not know about Ctrl + Fn + B until just now.

@GDay - Don't have my docker config in front of me right now and want to sanity check it again before sharing, but will try to get back to you soon - I'm pretty sure I wasn't doing anything radically different to your template though...
Would be happy to separate that into a new thread if you want to keep it distinct from the KeyboardInterrupt/Control+C discussion.

Sorry for the late reaction!

unless you are interested in keeping the suggestion of changing the KeyboardInterrupt behaviour.

Hmmm... I think KeyboardInterrupt is being caught, but the ctrl + c message isn't always correct, as it seems to vary per device what keys need to be pressed (on windows, I think). Windows does seem to handle these things differently.
I did find this: https://danielkaes.wordpress.com/2009/06/04/how-to-catch-kill-events-with-python/
I am not entirely sure if that would work, but it might be worth a shot.

I can confirm the problem, I started a new Django project just to test it. There's nothing done in the project except configuration as shown in docs.
This is my settings.py file:
"""
Django settings for backend project.

Generated by 'django-admin startproject' using Django 5.0.2.

For more information on this file, see
https://docs.djangoproject.com/en/5.0/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.0/ref/settings/
"""

from pathlib import Path

# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent

# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'django-insecure-j^!&h+okb*!*1st1(5ulp%@it+e0mhqs)yohmpf&dqqh+ya)98'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

# Application definition

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django_q',
    'core',
]

MIDDLEWARE = [
    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

ROOT_URLCONF = 'backend.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
            ],
        },
    },
]

WSGI_APPLICATION = 'backend.wsgi.application'

# Database
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}

# Password validation
# https://docs.djangoproject.com/en/5.0/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
    {
        'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
    },
    {
        'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
    },
]

# Internationalization
# https://docs.djangoproject.com/en/5.0/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_TZ = True

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.0/howto/static-files/

STATIC_URL = 'static/'

# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

# Django-Q2 - native Django task queue, scheduler and worker application
# https://django-q2.readthedocs.io/en/master/configure.html
Q_CLUSTER = {
    'name': 'DjangORM',
    'workers': 4,
    'timeout': 90,
    'retry': 120,
    'queue_limit': 50,
    'bulk': 10,
    'orm': 'default'
}

When I run qcluster, that's what's shown in CMD window:
(venv) F:\djng\queues\backend>python manage.py qcluster
17:35:15 [Q] INFO Q Cluster friend-pizza-equal-don starting.
17:35:16 [Q] INFO Process-a77363f5bc964465b5df74695b528501 guarding cluster friend-pizza-equal-don [DjangORM]
17:35:16 [Q] INFO Q Cluster friend-pizza-equal-don [DjangORM] running.
17:35:17 [Q] INFO Process-7745db6fe27e4b18b0561d42cda88855 ready for work at 32168
17:35:17 [Q] INFO Process-ef671c1d45754c5eab0187cf4604f866 ready for work at 19856
17:35:17 [Q] INFO Process-805149ca5ff14141a6e638a82eba5f88 ready for work at 27652
17:35:17 [Q] INFO Process-9092f476f014444bac154c109db36398 ready for work at 25336
17:35:17 [Q] INFO Process-bfb64627f9b745fdbfec1aed80369bdf monitoring at 20548
17:35:17 [Q] INFO Process-c11f21f884b049d4884e8ce9a2b7f139 pushing tasks at 40564

Then Ctrl+C is pressed and...
Process Process-805149ca5ff14141a6e638a82eba5f88:
Process Process-9092f476f014444bac154c109db36398:
Process Process-ef671c1d45754c5eab0187cf4604f866:
Process Process-7745db6fe27e4b18b0561d42cda88855:
Process Process-bfb64627f9b745fdbfec1aed80369bdf:
Process Process-c11f21f884b049d4884e8ce9a2b7f139:
Traceback (most recent call last):
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "F:\djng\queues\venv\Lib\site-packages\django_q\pusher.py", line 45, in pusher
    task_set = broker.dequeue()
               ^^^^^^^^^^^^^^^^
  File "F:\djng\queues\venv\Lib\site-packages\django_q\brokers\orm.py", line 85, in dequeue
    sleep(Conf.POLL)
Traceback (most recent call last):
Traceback (most recent call last):
KeyboardInterrupt
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "F:\djng\queues\venv\Lib\site-packages\django_q\worker.py", line 57, in worker
    for task in iter(task_queue.get, "STOP"):
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "F:\djng\queues\venv\Lib\site-packages\django_q\queues.py", line 72, in get
    x = super(Queue, self).get(*args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "F:\djng\queues\venv\Lib\site-packages\django_q\worker.py", line 57, in worker
    for task in iter(task_queue.get, "STOP"):
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\Python312\Lib\multiprocessing\queues.py", line 102, in get
    with self._rlock:
  File "C:\Program Files\Python312\Lib\multiprocessing\synchronize.py", line 95, in __enter__
    return self._semlock.__enter__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "F:\djng\queues\venv\Lib\site-packages\django_q\queues.py", line 72, in get
    x = super(Queue, self).get(*args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Program Files\Python312\Lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
KeyboardInterrupt
  File "F:\djng\queues\venv\Lib\site-packages\django_q\worker.py", line 57, in worker
    for task in iter(task_queue.get, "STOP"):
  File "C:\Program Files\Python312\Lib\multiprocessing\queues.py", line 102, in get
    with self._rlock:
  File "F:\djng\queues\venv\Lib\site-packages\django_q\monitor.py", line 44, in monitor
    for task in iter(result_queue.get, "STOP"):
  File "F:\djng\queues\venv\Lib\site-packages\django_q\worker.py", line 57, in worker
    for task in iter(task_queue.get, "STOP"):
  File "F:\djng\queues\venv\Lib\site-packages\django_q\queues.py", line 72, in get
    x = super(Queue, self).get(*args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\synchronize.py", line 95, in __enter__
    return self._semlock.__enter__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\djng\queues\venv\Lib\site-packages\django_q\queues.py", line 72, in get
    x = super(Queue, self).get(*args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\djng\queues\venv\Lib\site-packages\django_q\queues.py", line 72, in get
    x = super(Queue, self).get(*args, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\queues.py", line 103, in get
    res = self._recv_bytes()
          ^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
  File "C:\Program Files\Python312\Lib\multiprocessing\queues.py", line 103, in get
    res = self._recv_bytes()
          ^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\queues.py", line 102, in get
    with self._rlock:
  File "C:\Program Files\Python312\Lib\multiprocessing\connection.py", line 321, in _recv_bytes
    waitres = _winapi.WaitForMultipleObjects(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\connection.py", line 321, in _recv_bytes
    waitres = _winapi.WaitForMultipleObjects(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python312\Lib\multiprocessing\synchronize.py", line 95, in __enter__
    return self._semlock.__enter__()
           ^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
KeyboardInterrupt
KeyboardInterrupt
17:36:34 [Q] CRITICAL reincarnated worker Process-805149ca5ff14141a6e638a82eba5f88 after death
17:36:34 [Q] CRITICAL reincarnated worker Process-ef671c1d45754c5eab0187cf4604f866 after death
17:36:34 [Q] CRITICAL reincarnated monitor Process-bfb64627f9b745fdbfec1aed80369bdf after sudden death
17:36:34 [Q] CRITICAL reincarnated pusher Process-c11f21f884b049d4884e8ce9a2b7f139 after sudden death
17:36:35 [Q] CRITICAL reincarnated worker Process-9092f476f014444bac154c109db36398 after death
17:36:35 [Q] INFO Process-f30c22cc7e2649c5867b070d69ec9b05 ready for work at 39560
17:36:35 [Q] INFO Process-8b13b2c5d4e84860b6c360924fb32fc5 monitoring at 17108
17:36:35 [Q] INFO Process-77777145be2f4518b81b9ead0f36933c ready for work at 10836
17:36:35 [Q] CRITICAL reincarnated worker Process-7745db6fe27e4b18b0561d42cda88855 after death
17:36:35 [Q] INFO Process-b94f0e1cb8bc47d4a6a4f920293cfeb4 pushing tasks at 32472
17:36:36 [Q] INFO Process-fcfe42969243432ba80c6e8806be0fb5 ready for work at 27488
17:36:36 [Q] INFO Process-1eca3d77fa4f4c6b8a54c65a8b7aa463 ready for work at 6584


Update README.md

Replaced normalize with strip to allow function to work.

@jamiemaison Thank you!

You're welcome. Just used this in a project so thank you for writing it


add proxy support

I tested with Charles proxy on OSX and with Fiddler proxy on Windows.
The way it works is: create a file ".Proxy" with the host name and port of the proxy - for example http://<IP_ADDRESS>:8888. This assumes Fiddler or Charles is set to listen on local port 8888.

Not sure if this is going to address https://github.com/Microsoft/vsts-agent/issues/165
customer is using a bluecoat proxy. may ask him to retest after this is in.

correct - wont address #165 - this addresses debugging and unauthenticated proxies - first step


local storage not defined.

I am trying to use angular2-auth libarary in my project and followed every step written here, but I am getting the following error when my application is loading.
localStorage is not defined at new TokenService
is there anything else i need to do ?

Add dom to libs in your tsconfig.json

I already have dom added to libs in tsconfig.json. I just ran a test. so if page is completely loaded and i do console.log(localstorage) for example on button click it shows localstorage in console. the only time i am getting this error is when i am trying to access localStorage in constructor or in ngOnInit. almost seems somehow localStorage is not available. and as this library access the localStorage in constructor of TokenService which is invoked through dependency injection perhaps the error.

It might have to do with the new injector introduced in Angular 5


[OAuth] Add developer center links to OAuth apps texts

Add missing links from developer center new documentation in OAuth Apps pages:

https://carto.com/developers/fundamentals/oauth-apps
https://carto.com/developers/fundamentals/oauth-apps/#oauth-flow

Fixed here https://github.com/CartoDB/cartodb/pull/15082


NavBar Title

How can I prevent the title from truncating when its too long? Can you suggest a workaround if this is not possible? I already tried maximizing the navbar width using styles

3.0 release should solve this problem. However it has a little bit different API comparing with 2.x release. Anyway I'm closing this ticket because 2.x release will not be supported except critical bugs.

This is not solved and I'm using v3.39.2

I'm using v3.38.0, also having the same issue when showing on tablet.


⚠ AnimeBytes has degraded performance

In 039e4ca, AnimeBytes ($AB) experienced degraded performance:

HTTP code: 200
Response time: 3880 ms

Resolved: AnimeBytes performance has improved in a0975d4 after 7 minutes.


Cache builds when using builder

In https://github.com/ilianaw/rust-crowbar/blob/master/builder/build.sh a temporary cargo target dir is used. This means no caching. Do you think it would be acceptable to just use the regular target/ dir, or perhaps a docker-target dir inside the target dir or something? Would be nice to cache the builds.

I've had good luck with a Docker I use in travis that specifies a well known location for producing lambda build outputs https://github.com/softprops/lando/blob/master/builder/build.sh#L6
I have some documentation on how to gain the benefits of caching outputs through multiple runs - https://github.com/softprops/lando/tree/master/builder#usage


OfflineApps.py - issue when not using sub-folder to store content

I'm trying to use the Mathematica pkg recipe in AutoPkgr and am running across a problem that's got me stumped. I created an override for the recipe so I could customize it, then updated the "FILE_SHARE" key to an appropriate local path where I'm dropping the .dmg. When I run it, though, I get the following error:
WARNING: plist error for /Users/drwebster/Library/AutoPkg/RecipeRepos/com.github.UWO-MIO.UWO-AutoPkg/MicrosoftSilverlight/Silverlight.install.recipe: junk after document element: line 35, column 0 WARNING: plist error for /Users/drwebster/Library/AutoPkg/RecipeRepos/com.github.UWO-MIO.UWO-AutoPkg/Packages/Packages.munki.recipe: junk after document element: line 189, column 0 Failed local trust verification.
It's the only recipe I'm running, yet the error references recipes from another repo? Any ideas?

PR submitted for the syntax issues upstream.

AutoPkg scans all recipes in your recipe search path in order to determine parent relationships and look up custom processors, so it's expected that syntax errors in other repos might appear.
If you don't need those repos (e.g. for their parent recipes) you can use repo-delete to remove them. If you do need them, you might consider submitting a PR to their GitHub with the needed syntax fixes.

Thanks! I disabled that repo and I'm getting further along, but still running across an error:
/Users/drwebster/Library/AutoPkg/Cache/local.pkg-custom.Mathematica/downloads/Mathematica_13.1.0_MAC.dmg is not mounted Failed.
It's finding the .dmg I placed in the "file share" (just a folder I created in ~/Documents/autopkg-temp) and copying it to the above downloads directory, so it seems to be failing when trying to mount it?

@DrWebster Sorry for the delay, I've been on vacation for a weeks and catching up on things.
Can you provide a verbose (at least -vv, but more would likely help) run of your autopkg run so I can see what it's actually failing on?  You can redact any information that you don't want to share.

@MLBZ521 so I normally use AutoPkgr (the GUI). I created an override for the Mathematica.download recipe so I could customize the FILE_SHARE key. When I run the override from the CLI, here's the output:
`drw-mac:~ drwebster$ autopkg run Mathematica.download.local -vv
Processing Mathematica.download.local...
com.github.mlbz521.SharedProcessors/OfflineApps
{'Input': {'exception_string': 'Patch',
'limitation_string': '',
'major_version': '',
'max_depth': '1',
'search_path': '/Users/drwebster/Documents/autopkg/',
'search_string': 'Mathematica',
'version_separator': '-'}}
OfflineApps: No value supplied for OFFLINEAPPS_SMB_PORT, setting default value of: 445
OfflineApps: No value supplied for OFFLINEAPPS_SMB_MOUNT_POINT, setting default value of: /private/tmp/OfflineApps
OfflineApps: No value supplied for check_filesize, setting default value of: True
OfflineApps: Matched:  Mathematica_13.1.0_MAC.dmg
OfflineApps: Found major version:
OfflineApps: Latest version found:
OfflineApps: Source path:
OfflineApps: Downloading file:
OfflineApps: Destination:  /Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads//
Failed to download:
Failed.
Receipt written to /Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/receipts/Mathematica.download-receipt-20220718-140835.plist
The following recipes failed:
Mathematica.download.local
Error in local.local.download.Mathematica: Processor: com.github.mlbz521.SharedProcessors/OfflineApps: Error: Failed to download:
Nothing downloaded, packaged or imported.`
The recipe is definitely finding the .dmg in the path I specified, and it's also creating a "local.local.download.Mathematica" folder in the cache directory.

@DrWebster Yeah, it's finding a matching file name, so that part is working.
One issue is its not identifying version/major version.
OfflineApps: Matched: Mathematica_13.1.0_MAC.dmg
OfflineApps: Found major version:
OfflineApps: Latest version found:

This is because, in your override, the version_separator value is - (which is the default, so it was not overridden/changed) and there is no - in that file name.  Someone else had a similar issue recently; see #39 built point 2 in my second to last comment.  In short, you'll need to either rename the file or drop the vendor's installer (aka that .dmg) in a folder that is labeled in a way that the processor can identify the required information.  (I do the latter at my institution so that whoever downloads the installer doesn't have to rename anything, just create a new folder with the version string and go.  Sometimes one of my colleagues that is primarily a Windows admin downloads the installers and this is an easy practice for anyone to follow.)
The next issue is the Source path is never set, so it can't "download" the file that was matched.
OfflineApps: Source path:
OfflineApps: Downloading file:
OfflineApps: Destination: /Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads//
Failed to download:

This is likely because a Latest version was never identified because it couldn't parse a version string.  I think this second issue will be "resolved" (i.e. won't be a problem) once a version is identified in the step prior.  And further, I should probably update the processor to ensure that a Latest version was identified before attempting to download (so that it errors at the actual origin of the issue not further along).

@MLBZ521 thanks -- getting much closer now! I updated the override to change the separator to an underscore, then deleted the "_MAC" part from the filename (since the processor was getting tripped up on that). Now it finds the file and parses the version correctly. However, it's having problems mounting the image due to what appears to be a path problem in the cache directory:
OfflineApps: Matched:  Mathematica_13.1.0.dmg
OfflineApps: Found major version:  13
OfflineApps: Latest version found:  13.1.0
OfflineApps: Source path:  /Users/drwebster/Documents/autopkg/Mathematica_13.1.0.dmg
OfflineApps: Downloading file:  Mathematica_13.1.0.dmg
OfflineApps: Destination:  /Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads/Mathematica_13.1.0.dmg/Mathematica_13.1.0.dmg
{'Output': {'cached_path': '/Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads/Mathematica_13.1.0.dmg',
'download_changed': True,
'found_major_version': '13',
'version': '13.1.0'}}
FileFinder
{'Input': {'pattern': '/Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads/Mathematica_13.1.0.dmg/*.dmg'}}
FileFinder: No value supplied for find_method, setting default value of: glob
FileFinder: hdiutil imageinfo error hdiutil: imageinfo failed - image not recognized
with image /Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads/Mathematica_13.1.0.dmg.
/Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads/Mathematica_13.1.0.dmg is not mounted
Failed.
The input pattern in the FileFinder section is correct -- the recipe builds a folder named "Mathematica_13.1.0.dmg" and copies the .dmg file into it -- but it looks like the rest of the process is trying to treat the folder itself as if it's the target .dmg?

@DrWebster Yep, that (_MAC) would also be an issue.
I believe I have identified the issue.  It's basically due to me not testing the storing of the file in the search_path and not using a sub-folder (which is how I'm doing it).  I added this functionality earlier this year at someone else's request and I haven't test it.  I've made a few tweaks since adding, but no one has mentioned this issue.
I have a fix for it, but I need to run a few recipes tomorrow first so I don't have to update the parent trust info.  I'll follow up with you once it's been updated.

Oh and I also identified why this is happening and will include it in the fix as well:

The next issue is the Source path is never set, so it can't "download" the file that was matched.
OfflineApps: Source path:
OfflineApps: Downloading file:
OfflineApps: Destination: /Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/downloads//
Failed to download:

This is likely because a Latest version was never identified because it couldn't parse a version string. I think this second issue will be "resolved" (i.e. won't be a problem) once a version is identified in the step prior. And further, I should probably update the processor to ensure that a Latest version was identified before attempting to download (so that it errors at the actual origin of the issue not further along).

@DrWebster  Sorry for the delay again.  I've pushed the following commits that should resolve the issues identified above.

42a5a4f
791f3aa

Let me know your results after updating the local parent repo.

I updated the repo and gave it another shot, but now I'm getting a new error:
drw-mac:~ drwebster$ autopkg run Mathematica.download.local -vv
Processing Mathematica.download.local...
com.github.mlbz521.SharedProcessors/OfflineApps
{'Input': {'exception_string': 'Patch',
'limitation_string': '',
'major_version': '',
'max_depth': '1',
'search_path': '/Users/drwebster/Documents/autopkg/',
'search_string': 'Mathematica',
'version_separator': '_'}}
OfflineApps: No value supplied for OFFLINEAPPS_SMB_PORT, setting default value of: 445
OfflineApps: No value supplied for OFFLINEAPPS_SMB_MOUNT_POINT, setting default value of: /private/tmp/OfflineApps
OfflineApps: No value supplied for check_filesize, setting default value of: True
local variable 'name' referenced before assignment
Failed.
Receipt written to /Users/drwebster/Library/AutoPkg/Cache/local.local.download.Mathematica/receipts/Mathematica.download-receipt-20220726-085549.plist
The following recipes failed:
Mathematica.download.local
Error in local.local.download.Mathematica: Processor: com.github.mlbz521.SharedProcessors/OfflineApps: Error: local variable 'name' referenced before assignment
Nothing downloaded, packaged or imported.

@DrWebster  Whoops, fixed in afd1649.

@MLBZ521 Works great now! Thanks for your help!

@DrWebster Great!  Glad it's working for you now and thanks for reporting it and helping me get it fixed.


Celery integration not capturing error

The celery integration is failing to capture the exception when I use a celery factory pattern which patches the celery task with Flask's context.
This is web/celery_factory.py
# Source: https://stackoverflow.com/questions/12044776/how-to-use-flask-sqlalchemy-in-a-celery-task

from celery import Celery
import flask

class FlaskCelery(Celery):

    def __init__(self, *args, **kwargs):
        super(FlaskCelery, self).__init__(*args, **kwargs)
        self.patch_task()

        if 'app' in kwargs:
            self.init_app(kwargs['app'])

    def patch_task(self):
        TaskBase = self.Task
        _celery = self

        class ContextTask(TaskBase):
            abstract = True

            def __call__(self, *args, **kwargs):
                if flask.has_app_context():
                    return TaskBase.__call__(self, *args, **kwargs)
                else:
                    with _celery.app.app_context():
                        return TaskBase.__call__(self, *args, **kwargs)

        self.Task = ContextTask

    def init_app(self, app):
        self.app = app
        self.config_from_object(app.config)

celery_app = FlaskCelery()

I am adding a random raise inside a simple task
import celery_app from celery_factory.py
@celery_app.task
def simple_task():
    raise Exception("Testing Celery exception")

The error I get printed is:
[2019-03-08 21:24:21,117: ERROR/ForkPoolWorker-31] Task simple_task[d6e959b1-7253-4e55-861d-c1968ae14e1c] raised unexpected: RuntimeError('No active exception to reraise')
Traceback (most recent call last):
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/okomarov/Documents/repos/myproject/web/celery_factory.py", line 28, in __call__
    return TaskBase.__call__(self, *args, **kwargs)
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 66, in _inner
    reraise(*_capture_exception())
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py", line 52, in reraise
    raise value
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 64, in _inner
    return f(*args, **kwargs)
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 66, in _inner
    reraise(*_capture_exception())
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py", line 52, in reraise
    raise value
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 64, in _inner
    return f(*args, **kwargs)
  File "/Users/okomarov/Documents/repos/myproject/web/simple_task.py", line 4, in simple_task
    raise Exception("Testing Celery exception")
RuntimeError: No active exception to reraise

Relevant pip packages:
Celery==4.2.1
Flask==1.0.2
sentry-sdk==0.7.4

The integration is called as following (flask integration works as expected):
from flask import Flask
from celery_factory import celery_app
from config import config_to_use

def create_app():
    app = Flask()
    app.config.from_object(config_to_use)

    init_logging(app)

    register_extensions(app)
    register_blueprints(app)
    register_jinja_extras(app)

    return app

def init_logging(app):
    import sentry_sdk
    from sentry_sdk.integrations.flask import FlaskIntegration
    from sentry_sdk.integrations.celery import CeleryIntegration

    sentry_sdk.init(
        dsn=app.config.get('FLASK_SENTRY_DSN'),
        integrations=[FlaskIntegration(), CeleryIntegration()]
        )

...

Could this be related to https://github.com/getsentry/sentry-python/issues/265? I've heard people downgrading the SDK to pre 0.7.0 to fix that issue.
May I ask which celery version this is?

@untitaker Thanks for gettting back. I updated the original question with the versions of flask, celery and sentry-sdk.

So I am trying this app now, and can't repro the issue by hitting the index endpoint:
click
import flask
from celery import Celery

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
from sentry_sdk.integrations.celery import CeleryIntegration

sentry_sdk.init(integrations=[FlaskIntegration(), CeleryIntegration()])

app = flask.Flask(__name__)

class FlaskCelery(Celery):
    def __init__(self, *args, **kwargs):
        super(FlaskCelery, self).__init__(*args, **kwargs)
        self.patch_task()

        if "app" in kwargs:
            self.init_app(kwargs["app"])

    def patch_task(self):
        TaskBase = self.Task
        _celery = self

        class ContextTask(TaskBase):
            abstract = True

            def __call__(self, *args, **kwargs):
                if flask.has_app_context():
                    return TaskBase.__call__(self, *args, **kwargs)
                else:
                    with _celery.app.app_context():
                        return TaskBase.__call__(self, *args, **kwargs)

        self.Task = ContextTask

    def init_app(self, app):
        self.app = app
        self.config_from_object(app.config)

celery_app = FlaskCelery()
celery_app.conf.broker_url = "redis://localhost:6379/0"
celery_app.init_app(app)

@celery_app.task
def simple_task():
    raise Exception("Testing Celery exception")

@app.route("/")
def index():
    simple_task.delay()

    return "oK"

Are you able to repro with this? It should be almost identical to what you have.

I've tried sentry_sdk 0.6.9 and the most recent now 0.7.6. Launching app with flask run and celery with celery worker -A app:celery_app
I can see the error printed where celery is running but still nothing on sentry.io (flask errors come through, tested):
[2019-03-09 18:23:46,427: ERROR/ForkPoolWorker-6] Task webapp.simple_task[9b0e4aa8-16d3-4977-ba77-62af00cced84] raised unexpected: Exception('Testing Celery exception')
Traceback (most recent call last):
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/Users/okomarov/Documents/repos/myproject/web/celery_factory.py", line 28, in __call__
    return TaskBase.__call__(self, *args, **kwargs)
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 66, in _inner
    reraise(*_capture_exception())
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py", line 52, in reraise
    raise value
  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 64, in _inner
    return f(*args, **kwargs)
  File "/Users/okomarov/Documents/repos/myproject/web/webapp.py", line 175, in simple_task
    raise Exception("Testing Celery exception")
Exception: Testing Celery exception

I will next test your setup to make sure it's not my local environment quirks.

There are some issues with initialization order in the celery integration. Concretely you should initialize the SDK when the celery app is loaded (make sure you see the output on worker startup when using init(debug=True), not only when a task starts)
I thought I documented this, but apparently not.

There is somethinfg hairier unfortunately:

Form launch to error with debug info
celery worker -A app:celery_app
[sentry] DEBUG: Setting up integrations (with default = True)
[sentry] DEBUG: Setting up previously not enabled integration flask
[sentry] DEBUG: Setting up previously not enabled integration celery
[sentry] DEBUG: Setting up previously not enabled integration logging
[sentry] DEBUG: Setting up previously not enabled integration stdlib
[sentry] DEBUG: Setting up previously not enabled integration excepthook
[sentry] DEBUG: Setting up previously not enabled integration dedupe
[sentry] DEBUG: Setting up previously not enabled integration atexit
[sentry] DEBUG: Setting up previously not enabled integration modules
[sentry] DEBUG: Setting up previously not enabled integration argv
[sentry] DEBUG: Setting up previously not enabled integration threading
[sentry] DEBUG: Enabling integration flask
[sentry] DEBUG: Enabling integration celery
[sentry] DEBUG: Enabling integration logging
[sentry] DEBUG: Enabling integration stdlib
[sentry] DEBUG: Enabling integration excepthook
[sentry] DEBUG: Enabling integration dedupe
[sentry] DEBUG: Enabling integration atexit
[sentry] DEBUG: Enabling integration modules
[sentry] DEBUG: Enabling integration argv
[sentry] DEBUG: Enabling integration threading
[2019-03-09 18:46:56,469] INFO in app: Initializing database connection.
[2019-03-09 18:46:56,470] INFO in app: Initializing Celery app.
--------------<EMAIL_ADDRESS>v4.2.0 (windowlicker)
---- **** -----
--- * ***  * -- Darwin-18.2.0-x86_64-i386-64bit 2019-03-09 18:46:59
-- * - **** ---

** ---------- [config]
** ---------- .> app:         main:0x10cec5908
** ---------- .> transport:   redis://localhost:6379/0
** ---------- .> results:     redis://localhost:6379/0
*** --- * --- .> concurrency: 8 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery           exchange=celery(direct) key=celery

[sentry] DEBUG: Sending error event [9823659b9f1a4f6ea3f2f5a5f3308858] to sentry.io project:1408785
[2019-03-09 18:47:43,591: DEBUG/ForkPoolWorker-5] Sending error event [9823659b9f1a4f6ea3f2f5a5f3308858] to sentry.io project:1408785
[2019-03-09 18:47:43,613: ERROR/ForkPoolWorker-5] Task webapp.simple_task[c6dc958d-3a70-4728-9399-7dece57d0c15] raised unexpected: Exception('Testing Celery exception')
Traceback (most recent call last):
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(*args, **kwargs)
File "/Users/okomarov/Documents/repos/myproject/web/celery_factory.py", line 38, in call
return TaskBase.call(self, args, **kwargs)
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 641, in protected_call
return self.run(args, **kwargs)
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 66, in _inner
reraise(_capture_exception())
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py", line 52, in reraise
raise value
File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 64, in _inner
return f(args, **kwargs)
File "/Users/okomarov/Documents/repos/myproject/web/webapp.py", line 175, in simple_task
raise Exception("Testing Celery exception")
Exception: Testing Celery exception
[sentry] INFO: event processor (<function DedupeIntegration.setup_once..processor at 0x10cef51e0>) dropped event ({'level': 'error', 'exception': {'values': [{'module': None, 'type': 'Exception', 'value': 'Testing Celery exception', 'mechanism': {'type': 'logging', 'handled': True}, 'stacktrace': {'frames': [{'filename': 'celery/app/trace.py', 'abs_path': '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', 'function': 'trace_task', 'module': 'celery.app.trace', 'lineno': 382, 'pre_context': ['                        request=task_request,', '                    )', '', '                # -- TRACE --', '                try:'], 'context_line': '                    R = retval = fun(*args, **kwargs)', 'post_context': ['                    state = SUCCESS', '                except Reject as exc:', '                    I, R = Info(REJECTED, exc), ExceptionInfo(internal=True)', '                    state, retval = I.state, I.retval', '                    I.handle_reject(task, task_request)'], 'vars': {}}, {'filename': 'celery_factory.py', 'abs_path': '/Users/okomarov/Documents/repos/myproject/web/celery_factory.py', 'function': 'call', 'module': 'celery_factory', 'lineno': 38, 'pre_context': ['            def call(self, *args, **kwargs):', '                if flask.has_app_context():', '                    return TaskBase.call(self, *args, **kwargs)', '                else:', '                    with _celery.app.app_context():'], 'context_line': '                        return TaskBase.call(self, *args, **kwargs)', 'post_context': ['', '        self.Task = ContextTask', '', '    def init_app(self, app):', '        self.app = app'], 'vars': {}}, {'filename': 'celery/app/trace.py', 'abs_path': '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', 'function': 'protected_call', 'module': 'celery.app.trace', 'lineno': 641, 'pre_context': ['            stack = self.request_stack', '            req = stack.top', '            if req and not req._protected and \', '                    len(stack) == 1 and not req.called_directly:', '                req._protected = 1'], 'context_line': '                return self.run(*args, **kwargs)', 'post_context': ['            return orig(self, *args, **kwargs)', '        BaseTask.call = protected_call', '        BaseTask._stackprotected = True'], 'vars': {}}, {'filename': 'webapp.py', 'abs_path': '/Users/okomarov/Documents/repos/myproject/web/webapp.py', 'function': 'simple_task', 'module': 'webapp', 'lineno': 175, 'pre_context': ["    return render_template('operation.html', context=context)", '', ''<EMAIL_ADDRESS>'def simple_task():'], 'context_line': '    raise Exception("Testing Celery exception")', 'post_context': ['', '', '@webapp_bp.route("/celery_test/")', 'def index():', '    simple_task.delay()'], 'vars': {}}]}}]}, 'logger': 'celery.app.trace', 'logentry': {'message': 'Task %(name)s[%(id)s] %(description)s: %(exc)s', 'params': {'hostname'<EMAIL_ADDRESS>'id': 'c6dc958d-3a70-4728-9399-7dece57d0c15', 'name': 'webapp.simple_task', 'exc': "Exception('Testing Celery exception')", 'traceback': 'Traceback (most recent call last):\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File "/Users/okomarov/Documents/repos/myproject/web/celery_factory.py", line 38, in call\n    return TaskBase.call(self, args, **kwargs)\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 641, in protected_call\n    return self.run(args, **kwargs)\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 66, in _inner\n    reraise(_capture_exception())\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py", line 52, in reraise\n    raise value\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 64, in _inner\n    return f(args, **kwargs)\n  File "/Users/okomarov/Documents/repos/myproject/web/webapp.py", line 175, in simple_task\n    raise Exception("Testing Celery exception")\nException: Testing Celery exception\n', 'args': '[]', 'kwargs': '{}', 'description': 'raised unexpected', 'internal': False}}, 'extra': {'stack_info': None, 'asctime': '2019-03-09 18:47:43,613'}, 'event_id': '6ce54f345d4f4267b56deb368b2332b6', 'timestamp': datetime.datetime(2019, 3, 9, 18, 47, 43, 615940), 'breadcrumbs': [{'ty': 'log', 'level': 'info', 'category': 'root', 'message': 'Initializing database connection.', 'timestamp': datetime.datetime(2019, 3, 9, 18, 46, 56, 469992), 'data': {'stack_info': None, 'asctime': '2019-03-09 18:46:56,469'}, 'type': 'default'}, {'ty': 'log', 'level': 'info', 'category': 'root', 'message': 'Initializing Celery app.', 'timestamp': datetime.datetime(2019, 3, 9, 18, 46, 56, 470213), 'data': {'stack_info': None, 'asctime': '2019-03-09 18:46:56,470'}, 'type': 'default'}]})
[2019-03-09 18:47:43,616: INFO/ForkPoolWorker-5] event processor (<function DedupeIntegration.setup_once..processor at 0x10cef51e0>) dropped event ({'level': 'error', 'exception': {'values': [{'module': None, 'type': 'Exception', 'value': 'Testing Celery exception', 'mechanism': {'type': 'logging', 'handled': True}, 'stacktrace': {'frames': [{'filename': 'celery/app/trace.py', 'abs_path': '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', 'function': 'trace_task', 'module': 'celery.app.trace', 'lineno': 382, 'pre_context': ['                        request=task_request,', '                    )', '', '                # -- TRACE --', '                try:'], 'context_line': '                    R = retval = fun(*args, **kwargs)', 'post_context': ['                    state = SUCCESS', '                except Reject as exc:', '                    I, R = Info(REJECTED, exc), ExceptionInfo(internal=True)', '                    state, retval = I.state, I.retval', '                    I.handle_reject(task, task_request)'], 'vars': {}}, {'filename': 'celery_factory.py', 'abs_path': '/Users/okomarov/Documents/repos/myproject/web/celery_factory.py', 'function': 'call', 'module': 'celery_factory', 'lineno': 38, 'pre_context': ['            def call(self, *args, **kwargs):', '                if flask.has_app_context():', '                    return TaskBase.call(self, *args, **kwargs)', '                else:', '                    with _celery.app.app_context():'], 'context_line': '                        return TaskBase.call(self, *args, **kwargs)', 'post_context': ['', '        self.Task = ContextTask', '', '    def init_app(self, app):', '        self.app = app'], 'vars': {}}, {'filename': 'celery/app/trace.py', 'abs_path': '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', 'function': 'protected_call', 'module': 'celery.app.trace', 'lineno': 641, 'pre_context': ['            stack = self.request_stack', '            req = stack.top', '            if req and not req._protected and \', '                    len(stack) == 1 and not req.called_directly:', '                req._protected = 1'], 'context_line': '                return self.run(*args, **kwargs)', 'post_context': ['            return orig(self, *args, **kwargs)', '        BaseTask.call = protected_call', '        BaseTask._stackprotected = True'], 'vars': {}}, {'filename': 'webapp.py', 'abs_path': '/Users/okomarov/Documents/repos/myproject/web/webapp.py', 'function': 'simple_task', 'module': 'webapp', 'lineno': 175, 'pre_context': ["    return render_template('operation.html', context=context)", '', ''<EMAIL_ADDRESS>'def simple_task():'], 'context_line': '    raise Exception("Testing Celery exception")', 'post_context': ['', '', '@webapp_bp.route("/celery_test/")', 'def index():', '    simple_task.delay()'], 'vars': {}}]}}]}, 'logger': 'celery.app.trace', 'logentry': {'message': 'Task %(name)s[%(id)s] %(description)s: %(exc)s', 'params': {'hostname'<EMAIL_ADDRESS>'id': 'c6dc958d-3a70-4728-9399-7dece57d0c15', 'name': 'webapp.simple_task', 'exc': "Exception('Testing Celery exception')", 'traceback': 'Traceback (most recent call last):\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 382, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File "/Users/okomarov/Documents/repos/myproject/web/celery_factory.py", line 38, in call\n    return TaskBase.call(self, *args, **kwargs)\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py", line 641, in protected_call\n    return self.run(args, **kwargs)\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 66, in _inner\n    reraise(_capture_exception())\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py", line 52, in reraise\n    raise value\n  File "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py", line 64, in _inner\n    return f(*args, **kwargs)\n  File "/Users/okomarov/Documents/repos/myproject/web/webapp.py", line 175, in simple_task\n    raise Exception("Testing Celery exception")\nException: Testing Celery exception\n', 'args': '[]', 'kwargs': '{}', 'description': 'raised unexpected', 'internal': False}}, 'extra': {'stack_info': None, 'asctime': '2019-03-09 18:47:43,613'}, 'event_id': '6ce54f345d4f4267b56deb368b2332b6', 'timestamp': datetime.datetime(2019, 3, 9, 18, 47, 43, 615940), 'breadcrumbs': [{'ty': 'log', 'level': 'info', 'category': 'root', 'message': 'Initializing database connection.', 'timestamp': datetime.datetime(2019, 3, 9, 18, 46, 56, 469992), 'data': {'stack_info': None, 'asctime': '2019-03-09 18:46:56,469'}, 'type': 'default'}, {'ty': 'log', 'level': 'info', 'category': 'root', 'message': 'Initializing Celery app.', 'timestamp': datetime.datetime(2019, 3, 9, 18, 46, 56, 470213), 'data': {'stack_info': None, 'asctime': '2019-03-09 18:46:56,470'}, 'type': 'default'}]})

@okomarov is this now referring to your own webapp or the repro case I wrote?

Still my case. Im wondering why the event has been dropped. Maybe I need to format the error message a bit better. On my phone so will try your case tomorrow.
Thanks again for the support so far!

if you are talking about the literal message "event has been dropped", this
is expected. We capture the same exception twice (this is just a thing that
happens sometimes when you hook into so many things), so the error is
deduplicated later.
On Sat, Mar 9, 2019 at 10:40 PM Oleg Komarov<EMAIL_ADDRESS>wrote:

Still my case. Im wondering why the event has been dropped. Maybe I need
to format the error message a bit better. On my phone so will try your case
tomorrow.
Thanks again for the support so far!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/getsentry/sentry-python/issues/285#issuecomment-471224571,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAzHxRJAbgQytfHr5ndedCS9BHTSX9gBks5vVCphgaJpZM4bmLnZ
.

@untitaker I tried your setup and it works as expected. Comparing your setup versus mine from the debug message, the only differences I see are:

breadcrumbs - they don't get filtered out in my setup
my celery app is in a separate file from the views/app

My setup
{
  "level": "error",
  "exception": {
    "values": [{
      "module": "None",
      "type": "Exception",
      "value": "Testing Celery exception",
      "mechanism": {
        "type": "logging",
        "handled": "True"
      },
      "stacktrace": {
        "frames": [{
          "filename": "celery/app/trace.py",
          "abs_path": "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py",
          "function": "trace_task",
          "module": "celery.app.trace",
          "lineno": 382,
          "pre_context": ["                        request=task_request,", "                    )", "", "                # -*- TRACE -*-", "                try:"],
          "context_line": "                    R = retval = fun(*args, **kwargs)",
          "post_context": ["                    state = SUCCESS", "                except Reject as exc:", "                    I, R = Info(REJECTED, exc), ExceptionInfo(internal=True)", "                    state, retval = I.state, I.retval", "                    I.handle_reject(task, task_request)"],
          "vars": {}
        }, {
          "filename": "celery_factory.py",
          "abs_path": "/Users/okomarov/Documents/repos/myproject/web/celery_factory.py",
          "function": "__call__",
          "module": "celery_factory",
          "lineno": 28,
          "pre_context": ["            def __call__(self, *args, **kwargs):", "                if flask.has_app_context():", "                    return TaskBase.__call__(self, *args, **kwargs)", "                else:", "                    with _celery.app.app_context():"],
          "context_line": "                        return TaskBase.__call__(self, *args, **kwargs)",
          "post_context": ["", "        self.Task = ContextTask", "", "    def init_app(self, app):", "        self.app = app"],
          "vars": {}
        }, {
          "filename": "celery/app/trace.py",
          "abs_path": "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py",
          "function": "__protected_call__",
          "module": "celery.app.trace",
          "lineno": 641,
          "pre_context": ["            stack = self.request_stack", "            req = stack.top", "            if req and not req._protected and \\", "                    len(stack) == 1 and not req.called_directly:", "                req._protected = 1"],
          "context_line": "                return self.run(*args, **kwargs)",
          "post_context": ["            return orig(self, *args, **kwargs)", "        BaseTask.__call__ = __protected_call__", "        BaseTask._stackprotected = True"],
          "vars": {}
        }, {
          "filename": "webapp.py",
          "abs_path": "/Users/okomarov/Documents/repos/myproject/web/webapp.py",
          "function": "simple_task",
          "module": "webapp",
          "lineno": 175,
          "pre_context": ["    return render_template('operation.html', context=context)", "", ""<EMAIL_ADDRESS>"def simple_task():"],
          "context_line": "    raise Exception('Testing Celery exception')",
          "post_context": ["", "", "@webapp_bp.route('/celery_test/')", "def index():", "    simple_task.delay()"],
          "vars": {}
        }]
      }
    }]
  },
  "logger": "celery.app.trace",
  "logentry": {
    "message": "Task %(name)s[%(id)s] %(description)s: %(exc)s",
    "params": {
      "hostname"<EMAIL_ADDRESS>      "id": "14d947b0-7c56-4417-8c61-e11f98d59421",
      "name": "webapp.simple_task",
      "exc": "Exception('Testing Celery exception')",
      "traceback": "Traceback (most recent call last):\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', line 382, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File '/Users/okomarov/Documents/repos/myproject/web/celery_factory.py', line 28, in __call__\n    return TaskBase.__call__(self, *args, **kwargs)\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', line 641, in __protected_call__\n    return self.run(*args, **kwargs)\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py', line 66, in _inner\n    reraise(*_capture_exception())\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py', line 52, in reraise\n    raise value\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py', line 64, in _inner\n    return f(*args, **kwargs)\n  File '/Users/okomarov/Documents/repos/myproject/web/webapp.py', line 175, in simple_task\n    raise Exception('Testing Celery exception')\nException: Testing Celery exception\n",
      "args": "[]",
      "kwargs": "{}",
      "description": "raised unexpected",
      "internal": "False"
    }
  },
  "extra": {
    "stack_info": "None",
    "asctime": "2019-03-11 10:38:50,177"
  },
  "event_id": "172381d940ad481eb9ce37278126883b",
  "timestamp": "datetime.datetime(2019, 3, 11, 10, 38, 50, 179112)",
  "breadcrumbs": [{
    "ty": "log",
    "level": "info",
    "category": "root",
    "message": "Initializing database connection.",
    "timestamp": "datetime.datetime(2019, 3, 11, 10, 38, 36, 957407)",
    "data": {
      "stack_info": "None",
      "asctime": "2019-03-11 10:38:36,957"
    },
    "type": "default"
  }, {
    "ty": "log",
    "level": "info",
    "category": "root",
    "message": "Initializing Celery app.",
    "timestamp": "datetime.datetime(2019, 3, 11, 10, 38, 36, 957610)",
    "data": {
      "stack_info": "None",
      "asctime": "2019-03-11 10:38:36,957"
    },
    "type": "default"
  }]
}

Single file setup
{
  "level": "error",
  "exception": {
    "values": [{
      "module": "None",
      "type": "Exception",
      "value": "Testing Celery exception",
      "mechanism": {
        "type": "logging",
        "handled": "True"
      },
      "stacktrace": {
        "frames": [{
          "filename": "celery/app/trace.py",
          "abs_path": "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py",
          "function": "trace_task",
          "module": "celery.app.trace",
          "lineno": 382,
          "pre_context": ["                        request=task_request,", "                    )", "", "                # -*- TRACE -*-", "                try:"],
          "context_line": "                    R = retval = fun(*args, **kwargs)",
          "post_context": ["                    state = SUCCESS", "                except Reject as exc:", "                    I, R = Info(REJECTED, exc), ExceptionInfo(internal=True)", "                    state, retval = I.state, I.retval", "                    I.handle_reject(task, task_request)"],
          "vars": {}
        }, {
          "filename": "app.py",
          "abs_path": "/Users/okomarov/Documents/repos/myproject/web/app.py",
          "function": "__call__",
          "module": "app",
          "lineno": 33,
          "pre_context": ["            def __call__(self, *args, **kwargs):", "                if flask.has_app_context():", "                    return TaskBase.__call__(self, *args, **kwargs)", "                else:", "                    with _celery.app.app_context():"],
          "context_line": "                        return TaskBase.__call__(self, *args, **kwargs)",
          "post_context": ["", "        self.Task = ContextTask", "", "    def init_app(self, app):", "        self.app = app"],
          "vars": {}
        }, {
          "filename": "celery/app/trace.py",
          "abs_path": "/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py",
          "function": "__protected_call__",
          "module": "celery.app.trace",
          "lineno": 641,
          "pre_context": ["            stack = self.request_stack", "            req = stack.top", "            if req and not req._protected and \\", "                    len(stack) == 1 and not req.called_directly:", "                req._protected = 1"],
          "context_line": "                return self.run(*args, **kwargs)",
          "post_context": ["            return orig(self, *args, **kwargs)", "        BaseTask.__call__ = __protected_call__", "        BaseTask._stackprotected = True"],
          "vars": {}
        }, {
          "filename": "app.py",
          "abs_path": "/Users/okomarov/Documents/repos/myproject/web/app.py",
          "function": "simple_task",
          "module": "app",
          "lineno": 51,
          "pre_context": ["webapp_bp = Blueprint('webapp', __name__)", "", ""<EMAIL_ADDRESS>"def simple_task():"],
          "context_line": "    raise Exception('Testing Celery exception')",
          "post_context": ["", "", "@webapp_bp.route('/')", "def index():", "    simple_task.delay()"],
          "vars": {}
        }]
      }
    }]
  },
  "logger": "celery.app.trace",
  "logentry": {
    "message": "Task %(name)s[%(id)s] %(description)s: %(exc)s",
    "params": {
      "hostname"<EMAIL_ADDRESS>      "id": "aaf821b2-b6f3-4c68-baf8-65d9dae7eb21",
      "name": "app.simple_task",
      "exc": "Exception('Testing Celery exception')",
      "traceback": "Traceback (most recent call last):\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', line 382, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File '/Users/okomarov/Documents/repos/myproject/web/app.py', line 33, in __call__\n    return TaskBase.__call__(self, *args, **kwargs)\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/celery/app/trace.py', line 641, in __protected_call__\n    return self.run(*args, **kwargs)\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py', line 66, in _inner\n    reraise(*_capture_exception())\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/_compat.py', line 52, in reraise\n    raise value\n  File '/Users/okomarov/.virtualenvs/myenv/lib/python3.7/site-packages/sentry_sdk/integrations/celery.py', line 64, in _inner\n    return f(*args, **kwargs)\n  File '/Users/okomarov/Documents/repos/myproject/web/app.py', line 51, in simple_task\n    raise Exception('Testing Celery exception')\nException: Testing Celery exception\n",
      "args": "[]",
      "kwargs": "{}",
      "description": "raised unexpected",
      "internal": "False"
    }
  },
  "extra": {
    "stack_info": "None",
    "asctime": "2019-03-11 10:57:53,095"
  },
  "event_id": "2c138005a9524b2b9b518a311d7732ba",
  "timestamp": "datetime.datetime(2019, 3, 11, 10, 57, 53, 98149)",
  "breadcrumbs": []
}

Single file app
from celery import Celery
import flask
from flask import Blueprint
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.flask import FlaskIntegration

sentry_sdk.init(dsn='...', integrations=[FlaskIntegration(), CeleryIntegration()], debug=True)
app = flask.Flask(__name__)

class FlaskCelery(Celery):

    def __init__(self, *args, **kwargs):
        super(FlaskCelery, self).__init__(*args, **kwargs)
        self.patch_task()

        if 'app' in kwargs:
            self.init_app(kwargs['app'])

    def patch_task(self):
        TaskBase = self.Task
        _celery = self

        class ContextTask(TaskBase):
            abstract = True

            def __call__(self, *args, **kwargs):
                if flask.has_app_context():
                    return TaskBase.__call__(self, *args, **kwargs)
                else:
                    with _celery.app.app_context():
                        return TaskBase.__call__(self, *args, **kwargs)

        self.Task = ContextTask

    def init_app(self, app):
        self.app = app
        self.config_from_object(app.config)

celery_app = FlaskCelery()
celery_app.conf.broker_url = "redis://localhost:6379/0"
celery_app.init_app(app)

webapp_bp = Blueprint('webapp', __name__)

@celery_app.task
def simple_task():
    raise Exception("Testing Celery exception")

@webapp_bp.route("/")
def index():
    simple_task.delay()

    return "oK"

app.register_blueprint(webapp_bp)

(I tried to fix your collapsible thin- ah, you fixed it)
Yeah. I don't see how those things are significant :(

Could you kindly point me where in the code of the python sentry_sdk the event is posted to the dsn?
I will check if the error is actually posted and how.

If you're just looking for a place to put print statements into, this is the way to go: https://github.com/getsentry/sentry-python/blob/5cfd1f7d101f100d864e7e1e330c4bf53f5c04f2/sentry_sdk/transport.py#L94
However, you already have the output of that log stmt in your logfile.

Thanks a lot for the pointer. Yes, I will be printing and checking that the json is properly formatted etc...
If the message is being sent, but does not appear in sentry.io/issues, I guess my next best guess is to contact sentry.io/help to understand what the issue is?
PS. We don't have any inbound filters.

I think a reasonable approach to investigating this issue now would be to take a copy your app and continuously remove random code while checking if the issue still persists. At some point there should be a repro case left that is so small there are no significant issues with intellectual property.
This is a daunting task but it's the way I've found those kind of issues in the past, at least when proprietary code is involved.

@untitaker So I managed to reproduce the issue.
When you set the CELERYD_MAX_TASKS_PER_CHILD = 1, and the task error, it hangs until you close shutdown the workers.
Let me know if you experience the same now. Also, I believe this is potentially a celery issue?

@okomarov Fantastic, I can reproduce the issue. I consider this to be a bug in the SDK and not Celery. Please close the celery issue.
This is likely a duplicate of #291. The testcase can be simplified as follows:
from celery import Celery
import sentry_sdk
from sentry_sdk.integrations.celery import CeleryIntegration
from sentry_sdk.integrations.flask import FlaskIntegration

sentry_sdk.init(
<EMAIL_ADDRESS>    integrations=[FlaskIntegration(), CeleryIntegration()],
    debug=True
)

celery_app = Celery()
celery_app.conf.broker_url = "redis://localhost:6379/0"
celery_app.conf.worker_max_tasks_per_child = 1

@celery_app.task
def simple_task():
    sentry_sdk.capture_exception(Exception("Testing Celery exception"))
    # import time  # uncomment to "fix"
    # time.sleep(4)

At first glance this issue seems low-priority to me, since I consider bumping max_tasks_per_child an adequate workaround. However, I might be wrong. I wonder why you set it to that value in the first place?

@untitaker Thanks for looking into this further.
Unfortunately we have a dependency that requires the max_tasks_per_child=1 (e.g. https://stackoverflow.com/questions/49347506/django-celery-scrapy-twisted-reactorreactornotrestartable-and-databasessl).
I tried your test case and I cannot reproduce the issue with that. I start celery with celery worker -A app:celery_app and after that I start a python shell, import simple task and call it. While the call seems blocking (I need to press ENTER to release), the sentry message comes through straight away.
This happens for any value of tasks per child and without that setting altogether.

What happens if you wrap your celery tasks with this decorator? https://docs.sentry.io/platforms/python/serverless/
(ignore that it's for serverless)

@untitaker Tested and it works both in local and production.
from celery import Celery
import flask
from sentry_sdk.integrations.serverless import serverless_function

class FlaskCelery(Celery):

    def __init__(self, *args, **kwargs):
        super(FlaskCelery, self).__init__(*args, **kwargs)
        self.patch_task()

        if 'app' in kwargs:
            self.init_app(kwargs['app'])

    def patch_task(self):
        TaskBase = self.Task
        _celery = self

        class ContextTask(TaskBase):
            abstract = True

            # The serverless patching is necessary with max_tasks_per_child = 1
            # See https://github.com/getsentry/sentry-python/issues/285
            @serverless_function
            def __call__(self, *args, **kwargs):
                if flask.has_app_context():
                    return TaskBase.__call__(self, *args, **kwargs)
                else:
                    with _celery.app.app_context():
                        return TaskBase.__call__(self, *args, **kwargs)

        self.Task = ContextTask

    def init_app(self, app):
        self.app = app
        self.config_from_object(app.config)

Okay. This is the same as #291 but I underestimated how strongly billard diverged. So this will be a celery-specific fix.

@okomarov 0.7.7 is released, could you check if it works now for you?

@untitaker It works in dev and should work in production (if not, will get back). Thanks for fixing this so quickly!


update: optimize training process

add sample number log
add predict result log
convert the training button reminder text to Chinese
add the default sample data set

@SirM2z Just found our online website(https://ml.imgcook.com/) won't get updated even though gh-pages deployment is done.

@SirM2z Just found our online website(https://ml.imgcook.com/) won't get updated even though gh-pages deployment is done.


Issue2527

Description
Added Metadata GRPC API
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #2527
Checklist
Please make sure you've  completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[ ] Created/updated tests
[x] Unit tests passing
[ ] End-to-end tests passing
[ ] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

Thanks!
Can you add unit tests in pkg/grpc/api_test.go?

Thanks!
Can you add unit tests in pkg/grpc/api_test.go?

Sure, I will add unit tests

Sure, I will add unit tests


Android Basics: Lunch Tray app

URL of codelab
https://developer.android.com/codelabs/basic-android-kotlin-training-project-lunch-tray?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-kotlin-unit-3-pathway-4%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-training-project-lunch-tray#2
In which task and step of the codelab can this issue be found?
Step 3 "Get Started"
Describe the problem
There is a typo in:

If the _subtotal's value is null(is null, really?), subtract the previousEntreePrice from the subtotal.

Steps to reproduce?

Go to...
Click on...
See error...

Versions
Android Studio version:
API version of the emulator:
Additional information
Include screenshots if they would be useful in clarifying the problem.

@Generic-droid
Thank you for reaching out to us. The typo is fixed and will be published soon:


Update license year

2023 --> 2024

hey, im intreseted can i do it for you?

sure thing!

fixed! #138
sorry for delay! i was trying to research if there any changes!
Thanks for patience!

no problem man, thanks!


Stop fallback in chainerx.{all/any}

Rel. #6781 .

Please check the test errors.

Please add tests.

This PR fixes #6873

Jenkins, test this please

Jenkins, test this please

Jenkins CI test (for commit 365a8461cb3f7b3474d4168bdad0370f3d0a6770, target branch master) failed with status FAILURE.

Jenkins, test this please

Jenkins CI test (for commit 365a8461cb3f7b3474d4168bdad0370f3d0a6770, target branch master) failed with status FAILURE.

Jenkins, test this please

Jenkins CI test (for commit 365a8461cb3f7b3474d4168bdad0370f3d0a6770, target branch master) failed with status FAILURE.

LGTM

Jenkins CI test (for commit 365a8461cb3f7b3474d4168bdad0370f3d0a6770, target branch master) failed with status FAILURE.


deid/Microsoft.Health.Fhir.Anonymizer.R4.CommandLineTool: Exec format error\n

I am recieving this exec format error when I try to run the deid tool as a subprocess in python. Can I get any insights regarding why this might be occuring.

Can you please provide the command you're using and the error message you're seeing?

Closing due to inactivity -- feel free to re-open if you have more information on this issue.