bepasty: Service fails to start

Describe the bug
I'm trying to enable the bepasty service like this:
{ pkgs, config, ... }:

let
  bepasty-host = "paste.lounge.rocks";
in {
  services.bepasty = {
    enable = true;
    servers."${bepasty-host}" = {
      secretKeyFile = "/var/src/secrets/bepasty/key";
      # extraConfig = '' '' ;
      bind = "<IP_ADDRESS>:8000";
    };
  };

But the server fails to start. The output of starting the service manually with the command from the generated systemctl cat bepasty-server-paste.lounge.rocks-gunicorn.service Show some kind of python error, but I'm not sure what the cause is.
[2021-03-14 17:24:51 +0100] [30358] [INFO] Starting gunicorn 20.0.4
[2021-03-14 17:24:51 +0100] [30358] [INFO] Listening at: http://<IP_ADDRESS>:8000 (30358)
[2021-03-14 17:24:51 +0100] [30358] [INFO] Using worker: gevent
[2021-03-14 17:24:51 +0100] [30360] [INFO] Booting worker with pid: 30360
[2021-03-14 17:24:51 +0100] [30361] [INFO] Booting worker with pid: 30361
[2021-03-14 17:24:51 +0100] [30362] [INFO] Booting worker with pid: 30362
[2021-03-14 17:24:51 +0100] [30360] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 162, in init_process
    super().init_process()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
    self.load_wsgi()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/nix/store/yl69v76azrz4daiqksrhb8nnmdiqdjg9-python3-3.8.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/wsgi.py", line 4, in <module>
    from .app import create_app
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/app.py", line 13, in <module>
    from .apis import blueprint as blueprint_apis
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/__init__.py", line 3, in <module>
    from .lodgeit import LodgeitUpload
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/lodgeit.py", line 15, in <module>
    class LodgeitUpload(MethodView):
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/lodgeit.py", line 25, in LodgeitUpload
    name = lexer[1][0]
IndexError: tuple index out of range
[2021-03-14 17:24:51 +0100] [30360] [INFO] Worker exiting (pid: 30360)
[2021-03-14 17:24:51 +0100] [30361] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 162, in init_process
    super().init_process()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
    self.load_wsgi()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/nix/store/yl69v76azrz4daiqksrhb8nnmdiqdjg9-python3-3.8.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/wsgi.py", line 4, in <module>
    from .app import create_app
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/app.py", line 13, in <module>
    from .apis import blueprint as blueprint_apis
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/__init__.py", line 3, in <module>
    from .lodgeit import LodgeitUpload
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/lodgeit.py", line 15, in <module>
    class LodgeitUpload(MethodView):
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/lodgeit.py", line 25, in LodgeitUpload
    name = lexer[1][0]
IndexError: tuple index out of range
[2021-03-14 17:24:51 +0100] [30361] [INFO] Worker exiting (pid: 30361)
Traceback (most recent call last):
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 209, in run
    self.sleep()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 357, in sleep
    ready = select.select([self.PIPE[0]], [], [], 1.0)
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
    self.reap_workers()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/bin/.gunicorn-wrapped", line 9, in <module>
    sys.exit(run())
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/base.py", line 228, in run
    super().run()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 229, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 342, in halt
    self.stop()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 393, in stop
    time.sleep(0.1)
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld
    self.reap_workers()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
[2021-03-14 17:24:51 +0100] [30362] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
    worker.init_process()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 162, in init_process
    super().init_process()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
    self.load_wsgi()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
    return self.load_wsgiapp()
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/nix/store/851hwj40nrhhfx61v6fr34zk7m1nawc6-python3.8-gunicorn-20.0.4/lib/python3.8/site-packages/gunicorn/util.py", line 358, in import_app
    mod = importlib.import_module(module)
  File "/nix/store/yl69v76azrz4daiqksrhb8nnmdiqdjg9-python3-3.8.8/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/wsgi.py", line 4, in <module>
    from .app import create_app
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/app.py", line 13, in <module>
    from .apis import blueprint as blueprint_apis
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/__init__.py", line 3, in <module>
    from .lodgeit import LodgeitUpload
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/lodgeit.py", line 15, in <module>
    class LodgeitUpload(MethodView):
  File "/nix/store/das4v86sdl1xgi3acmiq39cgrlm7cmqv-python3-3.8.8-env/lib/python3.8/site-packages/bepasty/apis/lodgeit.py", line 25, in LodgeitUpload
    name = lexer[1][0]
IndexError: tuple index out of range
[2021-03-14 17:24:51 +0100] [30362] [INFO] Worker exiting (pid: 30362)

To Reproduce
Steps to reproduce the behavior:

Enable services.bepasty

Expected behavior
bepasty server starts
Notify maintainers

@rnhmjoj  @worldofpeace @makefu
Metadata

system: "x86_64-linux"
host os: Linux 5.4.104, NixOS, 21.05.20210312.916ee86 (Okapi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.4pre20210308_1c0e3e4
channels(root): ""
channels(pinpox): "home-manager"
nixpkgs: /nix/store/vw365chp87kvfczxm26qiq7z2pq3jk5z-source

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module: bepasty

Just found this: It seems to be related: https://github.com/bepasty/bepasty-server/issues/258

Pygments before 2.7.4 is vulnerable to an infinite loop on certain user inputs, so I would not recommend downgrading the dependency.
https://github.com/pygments/pygments/commit/f91804ff4772e3ab41f46e28d370f57898700333

You can try applying https://github.com/bepasty/bepasty-server/pull/256.

And now we can try to update bepasty to 1.0.0.

I'm not sure how to get the correct pypi sha256 value. Can someone help me out in fixing this?


Quoted items in lists

I'm really loving exploring the combination of Docile, Lexicon, & Markdown! Really powerful stuff.
One bug I noted. In this file:
Here's a Markdown file.
Let's see if it's return-sensitive.

Here's a list:

  * Item one, `push!`
  * Item two, `pop!`

push! and pop! don't get the blue highlight I'd expect them to.
I also initially constructed that list with -, and ran across #12.

This bug still appears using Julia 0.34, but not on 0.4 nightlies:
julia> VERSION
v"0.3.4"
julia> Pkg.installed("Markdown")
v"0.2.1"
Markdown.parse("""
       Here's a Markdown file.
       Let's see if it's return-sensitive.

       Here's a list:

         * Item one, `push!`
         * Item two, `pop!`
       """)

  Here's a Markdown file. Let's see if it's return-sensitive.

  Here's a list:

    • Item one, `push!`
    • Item two, `pop!`

This bug still appears using Julia 0.34, but not on 0.4 nightlies:
julia> VERSION
v"0.3.4"
julia> Pkg.installed("Markdown")
v"0.2.1"
Markdown.parse("""
       Here's a Markdown file.
       Let's see if it's return-sensitive.

       Here's a list:

         * Item one, `push!`
         * Item two, `pop!`
       """)

  Here's a Markdown file. Let's see if it's return-sensitive.

  Here's a list:

    • Item one, `push!`
    • Item two, `pop!`

I'm also observing this bug with Julia 0.3.3.

I'm also observing this bug with Julia 0.3.3.

I noticed that this is actually fixed in master and it works if I install using:
Pkg.clone("git@github.com:one-more-minute/Markdown.jl.git")

I noticed that this is actually fixed in master and it works if I install using:
Pkg.clone("git@github.com:one-more-minute/Markdown.jl.git")

Yes, the patch isn't released yet but you can use Pkg.checkout("Markdown"). I'll tag a new version once I've fixed another couple of issues that have cropped up.

Yes, the patch isn't released yet but you can use Pkg.checkout("Markdown"). I'll tag a new version once I've fixed another couple of issues that have cropped up.


error: No value for senderID with google-services.json

i have add  "google-services.json" on my cordova project root folder then i add  this line :
<resource-file src="google-services.json" target="google-services.json" />
on my config.xml even in cordova root folder (not in android or ios subfolder) but it continue to ask for senderID... why?
cordova -v = 7.0.1
phonegap-plugin-push -v = 1.10.5

onDeviceReady: function() {
		this.log('[app] lsd deviceready');

        var push = PushNotification.init({
            android: {}
        });

        push.on('registration', function(data) {
            app.log('lsd registrationId: ' + data.registrationId);
        });

        push.on('notification', function(data) {
            app.log('lsd: ' + data.message);
            app.log('lsd title: ' + data.title);
        });

        push.on('error', function(e) {
            app.log('lsd error: ' + e.message);
        });

and that's the log :
/Push_Plugin(29998): execute: action=init
/Push_Plugin(29998): execute: data=[{"android":{}}]
/Push_Plugin(29998): execute: jo={}
/Push_Plugin(29998): execute: Got JSON Exception No value for senderID
/Push_Plugin(29998): no icon option
/Push_Plugin(29998): no iconColor option
[....]
file:///android_asset/www/js/index.js: Line 216 : lsd error: No value for senderID
[INFO:CONSOLE(216)] "lsd error: No value for senderID"

maybe i have to put manually the google-services.json on my platform android root folder?

@d3w201 right this is because version 2.x of the plugin reads from google-services.json while you are using version 1.x which needs it included in the object passed to the init method. Docs for the older version of the plugin are preserved at:
https://github.com/phonegap/phonegap-plugin-push/tree/v1.x


Combinatorics

I want to add some combinatorics-related problems. Please assign this issue

Sure @SanthoshPatkar, you can go ahead !

@SanthoshPatkar make sure to add only one question in each issue , make multiple issues for multiple questions.

@SanthoshPatkar , Also mention the language.

okay sure


Repetier Server shows the second extruder twice, but not the first extruder at all

Home Assistant release with the issue: 0.101.0.dev0

Last working Home Assistant release (if known): Not known
Operating environment (Hass.io/Docker/Windows/etc.):

arch | x86_64
dev | true
docker | false
hassio | false
os_name | Linux
python_version | 3.7.4
timezone | UTC
version | 0.101.0.dev0
virtualenv | true
Integration: https://www.home-assistant.io/integrations/repetier/

Description of problem:
Repetier Server shows the second extruder twice, but not the first extruder at all.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
repetier:
  - host: <hostname>
    api_key: <api key>

Traceback (if applicable):
None

Additional information:

Will have a look at it as soon as I get my crashed dev env up and running again :(


Naming collision of hidden variables when mixing for-of and spread operator

TypeScript Version:  2.1.4
Code
function baz(x: any) {
  return [[x, x]];
}

function foo(set: any) {
  for (const [value, i] of baz(set.values)) {
    const bar: any = [];
    (() => bar);

    set.values.push(...[]);
  }
};

Expected behavior:
Names of hidden/implementation variables should not clash.
Actual behavior:
Two _a hidden variables are created which would be in different scopes under ES6 let/const but are in the same scope since they are var:
function baz(x) {
    return [[x, x]];
}
function foo(set) {
    var _loop_1 = function (value, i) {
        var bar = [];
        (function () { return bar; });
        (_a = set.values).push.apply(_a, []);
    };
    for (var _i = 0, _a = baz(set.values); _i < _a.length; _i++) {
        var _b = _a[_i], value = _b[0], i = _b[1];
        _loop_1(value, i);
    }
    var _a;
}
;

Note:
After pruning my code to isolate the issue, I'm not sure what the impact of the collision is anymore, but in my original code I was getting an infinite loop due to the loop index being part of the collision. I should be able to produce a short example like that if needed.

Wow that was fast @vladima :tada:


400 error on get_block() call

When I am making a client.get_block(full_url) call, I am getting the below:
Got 400 error attempting to POST to loadPageChunk, with data: {
    "pageId": "***",
    "limit": 100000,
    "cursor": {
        "stack": []
    },
    "chunkNumber": 0,
    "verticalColumns": false
 }

[ERROR] HTTPError: Invalid input.
Traceback (most recent call last):
  File "/var/task/get_kitchens_function.py", line 15, in lambda_handler
    page = client.get_block(full_url)
  File "/opt/python/lib/python3.7/site-packages/notion/client.py", line 169, in get_block
    block = self.get_record_data("block", block_id, force_refresh=force_refresh)
  File "/opt/python/lib/python3.7/site-packages/notion/client.py", line 162, in get_record_data
    return self._store.get(table, id, force_refresh=force_refresh)
  File "/opt/python/lib/python3.7/site-packages/notion/store.py", line 184, in get
    self.call_load_page_chunk(id)
  File "/opt/python/lib/python3.7/site-packages/notion/store.py", line 286, in call_load_page_chunk
    recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]
  File "/opt/python/lib/python3.7/site-packages/notion/client.py", line 262, in post
    "message", "There was an error (400) submitting the request."

I didn't change anything in my code and this just started to happen. I suspected it was a token_V2 problem but just checked and it isn't. I saw #11 from back then and looks like there might be an API structural change.
Would love to hear all of your thoughts! Trying to get this resolved because a product of mine depends on this! Thank you!

It seems that the Notion API has changed and a large limit get 400 error now.
I changed 100000 to 100, and got 200.

It seems that the Notion API has changed and a large limit get 400 error now.
I changed "limit": 100000 to "limit": 100 , and got 200.

Ok so I need to do like client.get_block(full_url, limit=100) now?

It seems that the Notion API has changed and a large limit get 400 error now.
I changed "limit": 100000 to "limit": 100 , and got 200.

@nissy131 Ok so I need to do like client.get_block(full_url, limit=100) now?

I think you should do this in source https://github.com/jamalex/notion-py/blob/c9223c0539acf38fd4cec88a629cfe4552ee4bf8/notion/store.py#L280 Because this is hardcoded value

It seems that the Notion API has changed and a large limit get 400 error now.
I changed "limit": 100000 to "limit": 100 , and got 200.

@nissy131 Ok so I need to do like client.get_block(full_url, limit=100) now?

I think you should do this in source
https://github.com/jamalex/notion-py/blob/c9223c0539acf38fd4cec88a629cfe4552ee4bf8/notion/store.py#L280
Because this is hardcoded value

Was just about to edit my reply. Probably could create a PR out of this. Is 100 the highest?

Should this be a hard coded value or should there be a way to adjust early on in a program?  And thanks for figuring this out.  I hit the same thing with something that worked a few hours ago was no longer working.

Should this be a hard coded value or should there be a way to adjust early on in a program? And thanks for figuring this out. I hit the same thing with something that worked a few hours ago was no longer working.

I agree with this and also think that there is going to be a need for pagination as well since some things might have more than 100 blocks.

https://github.com/jamalex/notion-py/pull/293 created this as a temporary fix.

In my case...
Traceback (most recent call last):
  File "app.py", line 71, in <module>
    cvb = client.get_block(os.getenv('TABLE_URL'))
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/notion/client.py", line 169, in get_block
    block = self.get_record_data("block", block_id, force_refresh=force_refresh)
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/notion/client.py", line 162, in get_record_data
    return self._store.get(table, id, force_refresh=force_refresh)
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/notion/store.py", line 184, in get
    self.call_load_page_chunk(id)
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/notion/store.py", line 286, in call_load_page_chunk
    recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/notion/client.py", line 260, in post
    raise HTTPError(
requests.exceptions.HTTPError: Invalid input.

Feel free to use #293 as a workaround for now.

`from tzlocal import get_localzone
import notion
def call_load_page_chunk(self, page_id):
if self._client.in_transaction():
    self._pages_to_refresh.append(page_id)
    return

data = {
    "pageId": page_id,
    "limit": 100,
    "cursor": {"stack": []},
    "chunkNumber": 0,
    "verticalColumns": False,
}

recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]

self.store_recordmap(recordmap)

def call_query_collection(
self,
collection_id,
collection_view_id,
search="",
type="table",
aggregate=[],
aggregations=[],
filter={},
sort=[],
calendar_by="",
group_by="",
):
assert not (
    aggregate and aggregations
), "Use only one of `aggregate` or `aggregations` (old vs new format)"

# convert singletons into lists if needed
if isinstance(aggregate, dict):
    aggregate = [aggregate]
if isinstance(sort, dict):
    sort = [sort]

data = {
    "collectionId": collection_id,
    "collectionViewId": collection_view_id,
    "loader": {
        "limit": 1000000,
        "loadContentCover": True,
        "searchQuery": search,
        "userLocale": "en",
        "userTimeZone": str(get_localzone()),
        "type": type,
    },
    "query": {
        "aggregate": aggregate,
        "aggregations": aggregations,
        "filter": filter,
        "sort": sort,
    },
}

response = self._client.post("queryCollection", data).json()

self.store_recordmap(response["recordMap"])

return response["result"]

def search_pages_with_parent(self, parent_id, search=""):
data = {
"query": search,
"parentId": parent_id,
"limit": 100,
"spaceId": self.current_space.id,
}
response = self.post("searchPagesWithParent", data).json()
self._store.store_recordmap(response["recordMap"])
return response["results"]
notion.store.RecordStore.call_load_page_chunk = call_load_page_chunk
notion.store.RecordStore.call_query_collection = call_query_collection
notion.client.NotionClient.search_pages_with_parent = search_pages_with_parent
`
The very hot, hot-fix based on #293

from tzlocal import get_localzone

import notion
def call_load_page_chunk(self, page_id):

    if self._client.in_transaction():
        self._pages_to_refresh.append(page_id)
        return

    data = {
        "pageId": page_id,
        "limit": 100,
        "cursor": {"stack": []},
        "chunkNumber": 0,
        "verticalColumns": False,
    }

    recordmap = self._client.post("loadPageChunk", data).json()["recordMap"]

    self.store_recordmap(recordmap)

def call_query_collection(
    self,
    collection_id,
    collection_view_id,
    search="",
    type="table",
    aggregate=[],
    aggregations=[],
    filter={},
    sort=[],
    calendar_by="",
    group_by="",
):

    assert not (
        aggregate and aggregations
    ), "Use only one of `aggregate` or `aggregations` (old vs new format)"

    # convert singletons into lists if needed
    if isinstance(aggregate, dict):
        aggregate = [aggregate]
    if isinstance(sort, dict):
        sort = [sort]

    data = {
        "collectionId": collection_id,
        "collectionViewId": collection_view_id,
        "loader": {
            "limit": 1000000,
            "loadContentCover": True,
            "searchQuery": search,
            "userLocale": "en",
            "userTimeZone": str(get_localzone()),
            "type": type,
        },
        "query": {
            "aggregate": aggregate,
            "aggregations": aggregations,
            "filter": filter,
            "sort": sort,
        },
    }

    response = self._client.post("queryCollection", data).json()

    self.store_recordmap(response["recordMap"])

    return response["result"]

def search_pages_with_parent(self, parent_id, search=""):
    data = {
        "query": search,
        "parentId": parent_id,
        "limit": 100,
        "spaceId": self.current_space.id,
    }
    response = self.post("searchPagesWithParent", data).json()
    self._store.store_recordmap(response["recordMap"])
    return response["results"]

notion.store.RecordStore.call_load_page_chunk = call_load_page_chunk
notion.store.RecordStore.call_query_collection = call_query_collection
notion.client.NotionClient.search_pages_with_parent = search_pages_with_parent

The very hot, hot-fix based on #293

@ttran that did the trick, thank you!

FYI, the API has been also changed so that requesting loadPageChunk multiple times will result in a 429 error(Too Many Requests).
In my case, I had to wait about a minute.

I got this error only on my second call to get_block() but, oddly, no error if I move this second call further down in my code.
Doesn't work ('HTTPError: Invalid Input' on second line)
reading_page_block = client.get_block(cfg['reading'])
reading_log = client.get_block(READING_LOG_ID) # child to reading_page_block

When I log the requests I see:
2021-04-04 13:42:16,414 DEBUG httplogger HTTP roundtrip
---------------- request ----------------
POST https://www.notion.so/api/v3/loadPageChunk
User-Agent: python-requests/2.25.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Content-Length: 136
Content-Type: application/json

b'{"pageId": "b23c6a42-fdbc-4992-a6c0-8349caca6fa4", "limit": 100000, "cursor": {"stack": []}, "chunkNumber": 0, "verticalColumns": false}'
---------------- response ----------------
400 Bad Request https://www.notion.so/api/v3/loadPageChunk
Date: Sun, 04 Apr 2021 18:42:16 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 102
Connection: keep-alive
Set-Cookie: [...]

But I don't have this issue when I run
  reading_page_block = client.get_block(cfg['reading'])

  books = {
      'name': [],
      'identifier': [],
      'pages_read': [],
      'timestamp': []
  }

  timestamp = datetime.now()

  # for each book or article, capture the desired fields
  for block in reading_page_block.children:
      if block.id not in [ARTICLES_ID, BOOKS_ID]:
          continue
      else:
          for row_block in block.collection.get_rows():
              if row_block.title:
                  books['name'].append(row_block.title)
                  try:
                      books['pages_read'].append(row_block.page_number or 0)
                  except AttributeError:
                      # articles don't have the pages_read property
                      if row_block.status and row_block.status.lower()=="read":
                          books['pages_read'].append(1)
                      else:
                          books['pages_read'].append(0)
                  books['identifier'].append(row_block.id)
                  books['timestamp'].append(timestamp)

  reading_log = client.get_block(READING_LOG_ID) # child to reading_page_block

Maybe I should also note that I'll get the same error upon entering the for loop above if I use a superclass of NotionClient with a modified constructor that just sets self.session to enable logging to stdout - I find this behavior strange as well. I'll attach this for good measure.
NotionClientSuper.txt


ChatGPT Export not working for knowledge graph maker

For the app.py in the knowledge graph folder, the knowledge graph doesn't generate for ChatGPT, as it only handles JSON arrays and not objects just yet

will look into this thx


main fails to build

Tried main this morning and got this following error
error[E0499]: cannot borrow `*progress` as mutable more than once at a time
  --> src/run.rs:57:21
   |
30 |         progress,
   |         -------- first mutable borrow occurs here
...
52 |                 work = work::Work::new(
   |                 ---- first borrow might be used here, when `work` is dropped and runs the destructor for type `Work<'_>`
...
57 |                     progress,
   |                     ^^^^^^^^ second mutable borrow occurs here

I think I got around this error by upgrading my rust version (via rustup update).

Hrm, CI is passing.  It might be a Rust version issue?  I guess I can bump the minimum version to make it clearer for the next person?

I bisected versions:
1.59.0 bad
1.67.1 bad
1.68.2 bad
1.69.0 bad
1.70.0 good
So somehow 1.70.0 allows this when others don't?  I looked through the changelog but didn't see anything that looked relevant.

Thanks for the fix, it builds correctly this morning!


the problem with the purchase

Bug description
Hello, I wanted to report this problem too, I don't think it's from you but I said I'd try it, as you can see I bought the premium version but I don't have access to the application on the new phone for a few months, is this the problem
if you want to see the uncensored picture, send a private message
I also made a ticket to Apple, I'm waiting for the answer in 48 hours
Screenshots

Steps to reproduce

Error is thrown

Hello @Suspectxyzz 👋
Sorry for this trouble.
Have you tried this help?
https://webssh.net/documentation/help/restore-purchases/
Have a nice day ☀


Any good features are welcomed!

Hey there,
I welcome you all to contribute to my project even if your contribution is small.
Thank you

put some logo

where do u wanna put?

Like my gallery logo, and some others

okay, go ahead

how about we can do drag image instead of click?

Oh!..try it

I'm closing this issue, if any updates pls do open new issue


CVE Vulnerabilities XML.toJSONObject

refer to https://avd.aquasec.com/nvd/2022/cve-2022-45688/

(Jove Github Bot) added it to the current sprint.

(Jove Github Bot) moved this ticket out of the GitHub project(up to 1200 tickets for one project).


fix: exclude staging and staging-merge branches from chart publish

exclude staging and staging-merge branches from publishing charts to helm registry

bors merge


Deploy Jackson using docker-compose

Easy to deploy
Add production deployment guide

Hello, @devkiran can I work on this issue? Thank you

I want to commit my code.

@terblkdragon0924 That's great news, please submit a PR from your fork.

I want to work on this issue can you assign it to me .

Same, I'm interested in working on this if there is no open PR for it yet :)

@asi309 and @MissaDavid you can work on this . I am not working on the issue and removing myself from assignees.

I'll look into it today and will create a draft PR later to show my progress.

@devkiran I have created a draft PR for the docker-compose file, but before I update the documentation, could you let me know if this meets your expectations? I couldn't find the requirements, so I've only added the version of the Docker command that was making use of a Postgres db. It might make sense to add the Mongo db variables as well and comment them out, or maybe even organise the config with separate profiles.
What do you think?

If it's still open, I'd love to work on this issue. 😁

Hi @f-enye, I have an open draft PR for this issue, and as you can see above I was still waiting for an answer from the code owners to get more detailed acceptance criteria. But if you want to work on this I don't mind, feel free to take over if you'd like and just let me know so I can close my PR.

@MissaDavid
I was actually going to follow up with you.
I'm considering building off of your changes.
I'll message you and the appropriate folks when I have something.


Feature Request: Option to comment on an issue when the "stale" label is removed

First off, thank you for this great service. I'm testing this out on one of the repositories that I help maintain and it has already been really useful.
Secondly, it would be great if there were an option for the bot to comment on an issue when the stale label is removed due to the issue being updated. Just something like "Thanks for commenting. This issue is no longer marked as stale."

Thanks for the suggestion!

Thanks for adding this so quickly!


[Jsontracer] Add dynamic graduation

This will render graduation. Graduation will work dynamically.
ONE-vscode-DCO-1.0-Signed-off-by: Junyeong Yang<EMAIL_ADDRESS>

from draft #126
from issue #94


makeStyles overload breakage with TypeScript 4.1

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate. Possibly #14018

Current Behavior 😯
With today's TypeScript 4.1 release, there's an issue with makeStyles that pops up:
import {createStyles, makeStyles} from '@material-ui/core/styles';
import React from 'react';

export function HeaderBreadcrumbs() {
  const classes = useStyles();
  //              ~~~~~~~~~~~ Expected 1 arguments, but got 0. ts(2554)
  return
Hello!
;
}

const useStyles = makeStyles(theme =>
  createStyles({
    outer: {
      '& .MuiLink-root': {
        ...theme.typography.h6,  // this line is key!
        color: 'inherit',
      },
    },
  }),
);

This passes the type checker with TS 4.0 but not TS 4.1, where you get this error:
Expected 1 arguments, but got 0. ts(2554)
An argument for 'props' was not provided.

This is being tracked on the TypeScript side over here: https://github.com/microsoft/TypeScript/issues/41099
Unclear to me if this is a TS problem or a MUI problem, but it can't hurt to have linked issues on both repos!
Expected Behavior 🤔
No type error (the code works fine at runtime)
Steps to Reproduce 🕹
See code above and in linked issue.
Context 🔦
TypeScript 4.1 update
Your Environment 🌎

Tech
Version

Material-UI
v4.11.0

React
16.13.1

Browser
n/a

TypeScript
4.1.2

etc.

I got same problem. 😢

I tried fix<EMAIL_ADDRESS>for debug.
/**
 * `makeStyles` where the passed `styles` do not depend on props
 */
export default function makeStyles<Theme = DefaultTheme, ClassKey extends string = string>(
  style: Styles<Theme, {}, ClassKey>,
  options?: Omit<WithStylesOptions<Theme>, 'withTheme'>
): (props?: any) => ClassNameMap<ClassKey>;
/**
 * `makeStyles` where the passed `styles` do depend on props
 */
export default function makeStyles<
  Theme = DefaultTheme,
  Props extends {} = {},
  ClassKey extends string = string
>(
  styles: Styles<Theme, Props, ClassKey>,
  options?: Omit<WithStylesOptions<Theme>, 'withTheme'>
): (
- props: Props
+ props?: Props
) => ClassNameMap<ClassKey>;

Type error was solved.

Can confirm in our own codebase now. We actually do run tests with TS canaries. But this particular error was hidden by another, less severe error. In the future we should be able to anticipate these regressions better.

Experiencing the same issue; where the culprit for me was ...theme.mixins.toolbar
spreading the object ...theme.mixins.toolbar gives
  @media (min-width:0px) and (orientation: landscape): {minHeight: 48}
  @media (min-width:600px): {minHeight: 64}
  minHeight: 56

so for now ive just appended those lines in place of the spread
          '& @media (min-width:0px) and (orientation: landscape)': { minHeight: 48 },
	   '& @media (min-width:600px)': { minHeight: 64 },
	    minHeight: 56

Can this be fixed in Version 4, please?

@ldrick Do you want to open a pull request for it on master?

Can this be fixed in Version 4, please?

Done #23692. It's unclear when we will release the changes. The simplest would be to wait around Q1 2021 https://twitter.com/olivtassinari/status/1328346262505205768. So we have enough deprecations to release.

I want to use of the combination of Typescript 4.1 and Material-UI as soon as possible, do you have any ideas?

Ahh that's a bummer - I was also hoping for a soon v4 release of this as we will need to work on many upgrades like Typescript 4.1, react 17, ... and preparing for the Material UI v5 release 🎉 . Waiting until Q1 would mean also hold off on all other upgrades and then we would need to do all at once 🙈 - so if there is away (other than sprinkling @ts-ignores over all components) that would be much appreciated 🙏🏻

Yeah, in hindsight, I think that we will do something this week. We still need to add support for React v17 and we can release.

https://github.com/mui-org/material-ui/releases/tag/v4.11.1


Code coverage not reported correctly for CTEs at the end of a stored procedure if the 'with' is immediately preceded with a semicolon

If a CTE is preceded by a semicolon e.g.
;with MyCTE as
(
...
and it is the last statement in a batch, the executed statement is matched against the immediately preceding statement instead. This is because the Overlaps function matches the preceding statement first due to the way that the coveredEnd variable is assigned the same value as the coveredOffset.
(This technically applies to other statements preceded with a semicolon, but it's unusual to see those).
I believe that the logic should change to treat those where coveredStatement.OffsetEnd is -1 (i.e. last statement) separate from others, and return true where the coveredOffset is equal or less than the tested statement's offset.
For other covered statements, the logic can now be simplified as we're no longer having to cope with both cases.
I've developed and tested a fix locally on my fork and will submit a pull request shortly.

This can now be closed following the pull request that was accepted yesterday evening


Kyspark 2.4.1.x 4.x soft affinity scheduler r68 for dadi

What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)
Please review http://spark.apache.org/contributing.html before opening a pull request.

retest this please


Exception when using nugget package 2.1.0

I get this exception when using latest nugget package :
System.MissingMethodException: 'Method not found: 'System.String Humanizer.InflectorExtensions.Singularize(System.String, Boolean)'.'
From this line :
modelBuilder.ConfigureEnumLookup(EnumLookupOptions.Default.Singularize().SetNamingScheme(name => "Ref_" + name).UseNumberAsIdentifier().SetDeleteBehavior(DeleteBehavior.ClientSetNull));
I don't know why, when I build from the git repo all tests passes, and the exception isn't thrown.
I had to update to Humanizer 2.8.26, because of another packages, maybe this is the issue.

I cannot reproduce the issue using the included sample project. Do you maybe have a small test repo for us to reproduce?

I just found that the Singularize signature has changed to  :
public string Singularize(string word, bool inputIsKnownToBePlural = true, bool skipSimpleWords = false)
There is a new argument.
The pluralize method didn't change, that's why I don't get any exception when using Pluralize, but Singularize throw an exception.

But it has a default value of false so I don't see why this should be an issue

Your assumptions were correct. I updated to the latest Humanizer version and it should work for you now. Nuget v2.1.2 should fix the issue. Thanks for reporting this.


provide a mongo-serializer

set up something similar to https://github.com/acdh-oeaw/acdh-apis-neo4j

done, see https://github.com/acdh-oeaw/acdh-apis-mongo


mock_sts throws ImportError: cannot import name 'sts_backend' from 'moto.sts'

I have been tracking https://github.com/spulec/moto/issues/2836 (relax version pins in setup.py for non-Py2 users, etc) and tested it against our code base. Many seem to be working but mock_sts is producing an ImportError.
At the bottom of this ticket, I have a sample test using pytest pulled from the mock_sts tests in moto that is producing the same error.
I've reviewed a few dev releases and found the breaking build:

works / passes with no errors:

4/27 - pip install moto==1.3.15.dev758

doesn't work / fails with an ImportError on mock_sts

4/28 - pip install moto==1.3.15.dev765

Using Python 3.7.3
Sample test sourced from https://github.com/spulec/moto/blob/master/tests/test_sts/test_sts.py#L56-L84
import pytest
import json
import boto3

from moto import mock_sts

ACCOUNT_ID = '123'

@mock_sts
def test_assume_role():
    client = boto3.client("sts", region_name="us-east-1")

    session_name = "session-name"
    policy = json.dumps(
        {
            "Statement": [
                {
                    "Sid": "Stmt13690092345534",
                    "Action": ["S3:ListBucket"],
                    "Effect": "Allow",
                    "Resource": ["arn:aws:s3:::foobar-tester"],
                }
            ]
        }
    )
    role_name = "test-role"
    s3_role = "arn:aws:iam::{account_id}:role/{role_name}".format(
        account_id=ACCOUNT_ID, role_name=role_name
    )
    assume_role_response = client.assume_role(
        RoleArn=s3_role,
        RoleSessionName=session_name,
        Policy=policy,
        DurationSeconds=900,
    )

    credentials = assume_role_response["Credentials"]
    assert credentials["SessionToken"] == 356

Error when moto==1.3.15.dev765
================================================================ ERRORS ================================================================
___________________________________________________ ERROR collecting simple_test.py ____________________________________________________
ImportError while importing test module '<path_to>/simple_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
simple_test.py:11: in <module>
    @mock_sts
.venv/lib/python3.7/site-packages/moto/__init__.py:8: in f
    module = importlib.import_module(module_name, "moto")
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
.venv/lib/python3.7/site-packages/moto/sts/__init__.py:2: in <module>
    from .models import sts_backend
.venv/lib/python3.7/site-packages/moto/sts/models.py:5: in <module>
    from moto.core import BaseBackend, BaseModel
.venv/lib/python3.7/site-packages/moto/core/__init__.py:4: in <module>
    from .responses import ActionAuthenticatorMixin
.venv/lib/python3.7/site-packages/moto/core/responses.py:14: in <module>
    from moto.core.access_control import IAMRequest, S3IAMRequest
.venv/lib/python3.7/site-packages/moto/core/access_control.py:46: in <module>
    from moto.sts import sts_backend
E   ImportError: cannot import name 'sts_backend' from 'moto.sts' (<path_to>/.venv/lib/python3.7/site-packages/moto/sts/__init__.py)
=========================================================== warnings summary ===========================================================
.venv/lib/python3.7/site-packages/boto/plugin.py:40
  <path_to>/.venv/lib/python3.7/site-packages/boto/plugin.py:40: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/latest/warnings.html
======================================================= short test summary info ========================================================
ERROR simple_test.py

This might have been fixed by #2938 - will have a look later to confirm

Can't reproduce this anymore with 1.3.15.dev797, so will close this.
Do let me know if I've missed anything

Agreed, 1.3.15.dev797 appears to clear our errors. Thanks!


Infinite recursion when word undefined inside word trap

[ this-word-is-undefined ] @: *trap
this-word-is-undefined-and-will-trigger-the-trap

One way to resolve this is to make sure we don't go into the same trap when inside that trap by only looking for the traps higher up in the block parent tree. But specifying what exactly inside trap means and what exactly higher up the parent tree means might be tricky. But doing trap recursion via undefined words is weird and unwanted, and so must be disabled. Plus minor mistakes like enquute which are apparent here but not in a large blob of code make it all scary, and errors are scary in Novika already.

It seems that it isn't an infinite loop but a recursion depth error.
It's just that the recursion limit is so high it's infinite in the debug build, and I've probably used the debug build when I found the issue.

No, it is an infinite loop in the older version, but it seems that I've fixed that in some of the commits (possibly the one which was about recursive instantiation crashes) and now it's caught as a recursion error.

Man, and that was a memory-exploding one! Good it's fixed now.


I'm having some problems with the output of the predictions

Hello, I am sorry to bother you again after such a long time, but recently I have been using your SimSpread algorithm for peptide target prediction, and the data I used are peptide-target interaction matrix and peptide-peptide similarity matrix, and I have followed the algorithm code you gave me, but in the end I can't get any valid predictions, all the prediction results are 0! Even the relationships that are already there cannot be predicted. I would like to ask you what caused this situation, is it the problem of the data I prepared or the problem of the algorithm, I hope you can give me some advice and teach me the way to solve this problem, I appreciate it!
I've also attached an example of the predictions obtained by running the code, which you can also see, which really doesn't contain any valid predictions
(P.S. I'm not using the native Julia code you provided here, but the code I wrote in Python according to the principle of your algorithm, which is basically the same as yours, so there's no problem with my code in terms of syntax and logic)
Predictions_0.20.csv

Hi! No problem, I'm here to help.
Since you are not using the version provided here, it's difficult to provide guidance to what could be happening so I'm going to suggest the following:

Did you reproduce the papers results with your python version?
Empty prediction (score = 0) mean the algorithm didn't find anything similar to what you are searching. This is intended. Have you done a parametrization of the similarity cutoff? Maybe it's to high and it results in this behavior.
You could use juliacall and python.jl to run the Julia code inside python. Check that if you can

Let me know so I can proceed helping you

Thanks for your suggestions, here's the deal:
First of all, I did not use the data in your paper to reproduce the results in your paper, but directly used my data to try to make predictions.
Second, I did not change the cutoff parameter, but used the optimal value of 0.2 that you set in your paper.
Thirdly, I have checked this question elsewhere, and concluded that it may be related to the data I used, and that the interaction matrix in my data may be too sparse to allow accurate resource diffusion.
Finally, do you have any background knowledge in Python? If you can, could you help me look at the python code I have written? I don't mean anything else, I just want to make sure that there are no other problems with my code, after all, you are a great expert in this field, I am honored to have your guidance, thank you!

Try using a different cutoff, since that cutoff was selected specifically for the combination of parameters we had in our problem.
I would recommend on first reproducing the results of the paper and later using the method for your use cases since it's the only way tu ensure the Python version works the same as the Julia one.
You may add the python code here, but as I said before, I would recommend using JuliaCall to use the SimSpread library directly in python.


Having long links displays tooltip in a large distance

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to staging dot on web chrome
Go to any chat
Send a very long link like around 3-4 lines (For example: go to google , search for flower and again type in flowers and hit enter so that a long link appears)
Copy the link and go to chat and paste it into the chat
Hover over the link and notice that the tooltip is displayed in a long distance
If you copy and paste the same link multiple times and hover over the link, notice that as much as the URL length increase, the tooltip distance also increases

Expected Result:
The tooltip distance should not be increased on the basis of the length of the URLs
Actual Result:
Having long links displays a tooltip at a large distance
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.20-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/11125ffc-9157-451f-904f-a91f12740cf9
https://github.com/Expensify/App/assets/43996225/3eb39e1c-365d-49c3-be3a-0f624560a6be
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685121313707479
View all open jobs on GitHub

@kavimuru Not able to reproduce after following the same steps as given. Is there anything specific that is needed for opening staging dot local?

@sethraj14 you need to hover on the top part of the link to get the tooltip. If you click on the end or on the bottom part, it will not be reproducible.

I'm not sure we need to fix this

@adelekennedy we have similar issues reported 1 and 2


JBPM-5030: Access control based on the new UF's authz subsystem

Changes required to support the new UF's security APIs
This PR depends on uberfire/uberfire#321

Am I missing something, or this PR removes security from planner-wb? (couldn't find any policy file changed nor restrictions applied)

Security is always enabled. See  => https://github.com/droolsjbpm/drools-wb/pull/187#issuecomment-223362753

+1


Fix new memory corruption in QPS test

Maybe it was never really legit to use the assignment operator on a ServerResponseWriter (etc) class but the issue got exposed because of the cq_tag change.
Supercedes #16889
Fixes #16899

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]

****************************************************************

libgrpc++.so

     VM SIZE              FILE SIZE
 ++++++++++++++ GROWIN ++++++++++++++
  [ = ]       0 [None]     +16  +0.0%

  [ = ]       0 TOTAL      +16  +0.0%

[trickle] No significant performance differences

****************************************************************

libgrpc.so

     VM SIZE        FILE SIZE
 ++++++++++++++  ++++++++++++++

  [ = ]       0        0  [ = ]

****************************************************************

libgrpc++.so

     VM SIZE              FILE SIZE
 ++++++++++++++ GROWIN ++++++++++++++
  [ = ]       0 [None]     +16  +0.0%

  [ = ]       0 TOTAL      +16  +0.0%

[trickle] No significant performance differences

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,996,269      Total (=)      1,996,269

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
11,020,631      Total (>)     11,020,628

 No significant differences in binary sizes

Corrupt JSON data (indicates timeout or crash):
    bm_call_create.BM_IsolatedFilter_ClientChannelFilter_NoOp_.counters.new: 10
    bm_call_create.BM_IsolatedFilter_ClientChannelFilter_NoOp_.counters.old: 10

[microbenchmarks] No significant performance differences

Objective-C binary sizes
*****************STATIC******************
  New size                      Old size
 1,996,269      Total (=)      1,996,269

 No significant differences in binary sizes

***************FRAMEWORKS****************
  New size                      Old size
11,020,630      Total (>)     11,020,629

 No significant differences in binary sizes

Corrupt JSON data (indicates timeout or crash):
    bm_call_create.BM_IsolatedFilter_ClientChannelFilter_NoOp_.counters.new: 10
    bm_call_create.BM_IsolatedFilter_ClientChannelFilter_NoOp_.counters.old: 10

[microbenchmarks] No significant performance differences

As we discussed, I think we can make this better by redefining the assignment operator for CallOpSet to handle cq_tag. But let's try this clean version First and hope that it doesn't cause any regression.

actually, thinking about it, I should fix the assignment operator. It is fundamental to the API since we haven't deleted it. I will respin this pull request.

Closing this one in favor of #16950


AMS using too much memory

When the AMS starts, it will use 400-500MB memory.
When execute first sql in AMS Dashboard, MEM usage will rise to about 1GB.
After writing some datas, then execute select * statement in AMS Dashboard.MEM usage will rise to about 1.7GB(increase about 700M).
The second time execute select * statement in AMS Dashboard, MEM usage will rise to about 1.8GB(increase about 100M).
The third time execute select * statement in AMS Dashboard, MEM usage will rise to about 1.85GB(increase about 50M or less).
The forth time execute select * statement in AMS Dashboard, MEM usage will rise to about 1.90GB(increase about 50M or less).
Then first time execute insert overwrite in AMS Dashboard, MEM usage will increase about 300MB.
Then second time execute insert overwrite in AMS Dashboard, MEM usage will increase about 50MB or less.
Then third time execute insert overwrite in AMS Dashboard, MEM usage will increase about 50MB or less.
in conclusion:
first time execute sql statement in AMS Dashboard, MEM usage will increase a lot(about 700MB), after first time it will be acceptable.
first time execute different types DML sql statement in AMS Dashboard, MEM usage will increase about 100MB-300MB, after first time it will be acceptable.
Evaluate:
just use quick start in docker, 3GB-4GB MEM is required for insurance.
Flink containers will also use about 1.7GB MEM in docker quick start, 2GB MEM is required for insurance.

executing spark sql through ams dashboard is not a good choice, arctic shall connect kyuubi or trino in terminal module in future work
there should be a memory limitation for ams local sql execution


Add support for custom avatar element coming from the props

thanks @nikolay-radkov ! think you could add this into the docs as well?


Avoid instanceof which leads to runtime errors with deep npm dependencies

The use of instanceof to check whether an object is of a class leads to unreliable check when importing Composer Concerto in projects with deep npm dependencies.
Context
Composer Concerto uses instanceof checks e.g., here https://github.com/hyperledger/composer-concerto/blob/37189e52c4f52d13cbd862b38d36a64022976398/lib/serializer/resourcevalidator.js#L72 or here https://github.com/hyperledger/composer-concerto/blob/37189e52c4f52d13cbd862b38d36a64022976398/lib/serializer/jsonpopulator.js#L96
Those can be unreliable since it checks whether this is the same object from the exact same package installed in a node.js project.
The reason it is unreliable is that it is difficult to enforce that the corresponding version of composer-concerto is installed exactly once in the ./node_modules directory through npm install.
This can lead to runtime errors when doing validation/serialization in some projects with deep npm dependencies.
Expected Behavior
A project should be able to import Composer Concerto 0.7.1 and PROJECT 0.X.X depending on e.g., Composer Concerto 0.7.0 without leading to runtime errors.
Actual Behavior
Currently a project has to ensure every dependency which import Composer Concerto have the exact same version, and that npm install leads to only one copy of that same version, which is difficult to guarantee (due to the way npm install works).
Possible Fix
Several fixes are suggested in: https://stackoverflow.com/questions/41587865/using-instanceof-on-objects-created-with-constructors-from-deep-npm-dependenci
The recommended fix is to use an explicit method to check whether an object has the expected class. So instead of writing thing instanceof RelationshipDeclaration one would write isRelationshipDeclaration(thing) where:
RelationshipDeclaration.prototype._isRelationshipDeclaration = true;
var isRelationshipDeclaration = function isRelationshipDeclaration(obj) {
  return obj instanceof RelationshipDeclaration || Boolean(obj._isRelationshipDeclaration);
};

module.exports = {
  RelationshipDeclaration,
  isRelationshipDeclaration
};

Steps to Reproduce

Existing issues

[x] Stack Overflow issues
[x] GitHub Issues
[ ] Rocket Chat history

Context
Importing Composer Concerto in various parts of the Accord Project (Ergo, Cicero, Cicero template library, template studio, etc.).
Your Environment

Version used: 0.70.*
Environment name and version (e.g. Chrome 39, node.js 5.4): node.js 8
Operating System and version (desktop or mobile): MacOS
Link to your project:

There still seems to be a few occurrences of instance of around: ```
bash-3.2$ grep -r instanceof lib
lib/serializer/typedstack.js:        if(expectedType && !(obj instanceof expectedType)) {
lib/serializer/typedstack.js:        if(expectedType && !(result instanceof expectedType)) {
lib/serializer/jsonpopulator.js:        if (thing instanceof ClassDeclaration) {
lib/serializer/jsonpopulator.js:        } else if (thing instanceof RelationshipDeclaration) {
lib/serializer/jsonpopulator.js:        } else if (thing instanceof Field) {
lib/serializer/instancegenerator.js:        if (thing instanceof ClassDeclaration) {
lib/serializer/instancegenerator.js:        } else if (thing instanceof RelationshipDeclaration) {
lib/serializer/instancegenerator.js:        } else if (thing instanceof Field) {
lib/serializer/instancegenerator.js:        if (classDeclaration instanceof EnumDeclaration) {
lib/serializer/resourcevalidator.js:        if (thing instanceof EnumDeclaration) {
lib/serializer/resourcevalidator.js:        } else if (thing instanceof ClassDeclaration) {
lib/serializer/resourcevalidator.js:        } else if (thing instanceof RelationshipDeclaration) {
lib/serializer/resourcevalidator.js:        } else if (thing instanceof Field) {
lib/serializer/resourcevalidator.js:        if(!((obj instanceof Resource) || (obj instanceof Concept))) {
lib/serializer/resourcevalidator.js:        if(obj instanceof Identifiable) {
lib/serializer/resourcevalidator.js:                    if(obj instanceof Identifiable) {
lib/serializer/resourcevalidator.js:        if(obj instanceof Identifiable) {
lib/serializer/resourcevalidator.js:        if(field.isArray() && !(obj instanceof Array)) {
lib/serializer/resourcevalidator.js:        if(!(obj instanceof Array)) {
lib/serializer/resourcevalidator.js:            if(obj instanceof Identifiable) {
lib/serializer/resourcevalidator.js:            if(!(obj instanceof Array)) {
lib/serializer/resourcevalidator.js:        if(obj instanceof Relationship) {
lib/serializer/resourcevalidator.js:        } else if (obj instanceof Resource && (this.options.convertResourcesToRelationships || this.options.permitResourcesForRelationships)) {
lib/serializer/resourcevalidator.js:        if(value instanceof Identifiable) {
lib/serializer/jsongenerator.js:        if (thing instanceof ClassDeclaration) {
lib/serializer/jsongenerator.js:        } else if (thing instanceof RelationshipDeclaration) {
lib/serializer/jsongenerator.js:        } else if (thing instanceof Field) {
lib/serializer/jsongenerator.js:        if (!((obj instanceof Resource) || (obj instanceof Concept))) {
lib/serializer/jsongenerator.js:        if (obj instanceof Identifiable && this.deduplicateResources) {
lib/serializer/jsongenerator.js:                if (this.permitResourcesForRelationships && item instanceof Resource) {
lib/serializer/jsongenerator.js:        } else if (this.permitResourcesForRelationships && obj instanceof Resource) {
lib/serializer/jsongenerator.js:        if (relationshipOrResource instanceof Resource) {
lib/factory.js:        if (!(classDeclaration instanceof TransactionDeclaration)) {
lib/factory.js:        if (!(classDeclaration instanceof EventDeclaration)) {
lib/introspect/parser.pegjs:InstanceofToken = "instanceof" !IdentifierPart
lib/introspect/modelfile.js:        if(classDeclaration instanceof AssetDeclaration) {
lib/introspect/modelfile.js:        if(classDeclaration instanceof TransactionDeclaration) {
lib/introspect/modelfile.js:        if(classDeclaration instanceof EventDeclaration) {
lib/introspect/modelfile.js:        if(classDeclaration instanceof ParticipantDeclaration) {
lib/introspect/modelfile.js:            if(classDeclaration instanceof type && (includeSystemType || !classDeclaration.isSystemType())) {
lib/introspect/parser.js:            escapedParts += expectation.parts[i] instanceof Array
lib/introspect/parser.js:      peg$c182 = "instanceof",
lib/introspect/parser.js:      peg$c183 = peg$literalExpectation("instanceof", false),
lib/model/typed.js:            if (field instanceof Field) {
lib/serializer.js:        if(!(resource instanceof Typed)) {
lib/serializer.js:        if (classDeclaration instanceof TransactionDeclaration) {
lib/serializer.js:        } else if (classDeclaration instanceof EventDeclaration) {
lib/serializer.js:        } else if (classDeclaration instanceof ConceptDeclaration) {
lib/serializer.js:        } else if (classDeclaration instanceof EnumDeclaration) {

Confirming that this works. The approach is to override hasInstance in the corresponding classes, which effectively underlies the implementation for instanceof.

Reopening based on further investigation and how it interacts with Babel:
https://github.com/accordproject/web-components/issues/110


Added annotations to sealed trait and sealed trait subtypes

Cool :)

Can you do a snapshot? I'm using this to upgrade https://github.com/sksamuel/avro4s

Created 2.0.0-M7

Awesome :)
On Fri, 11 Jun 2021 at 21:45, Kacper Korban @.***>
wrote:

Created 2.0.0-M7
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/softwaremill/magnolia/pull/312#issuecomment-859986267,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAFVSGTYS7XZLZ5OGFQDYFTTSLC3JANCNFSM46RXN7FA
.


Iam Api Server

Rebase and add tests https://github.com/chrislusf/seaweedfs/pull/1658

@chrislusf Here is the most necessary thing and ready for merging

Merged! Thanks! Now need some wiki on how to use it properly.

Merged! Thanks! Now need some wiki on how to use it properly.

ok.
@chrislusf How can I get a RWlock on the file with the s3 config in the filer?

there is no lock now. The last write wins.