Numba bridge

It would be great to support calls into Numba via an XLA CustomCall (which works inside jax.jit). This would let you use Numba as an alternative for writing low-level kernels in JAX.
xref https://github.com/google/jax/issues/81, https://github.com/google/jax/issues/1100

We are also interested how this would work.  (cc: @sklam, @esc, @stuartarchibald)

Looks like this could go via Numba's @cfunc machinery.

For examples of how JAX wraps XLA's CustomCall interface, take a look at lapack.pyx and cusolver.cc/cusolver.py in jaxlib:
https://github.com/google/jax/tree/master/jaxlib

Ah very cool! Does this work on TPUs as well?

We've been a little curious how one generates custom functions for the TPU as well.  We haven't seen an LLVM backend for the TPU anywhere, so I assume the toolchain is not public?

I've been having a little play to see how doable this is. I've got the basics of Numba for CPU working.
import jax
import jax.numpy as jnp
from jax import lax
from jax.lib import xla_bridge as xb
from jax.lib import xla_client as xc
import functools
import numba

prim = jax.core.Primitive("Foo")
prim.def_impl(functools.partial(jax.interpreters.xla.apply_primitive, prim))

def shape_rule(aval): return aval.shape
def dtype_rule(aval): return aval.dtype

prim.def_abstract_eval(functools.partial(jax.lax.standard_abstract_eval, prim, shape_rule, dtype_rule))

def encapsulate(address):
  import ctypes
  PyCapsule_Destructor = ctypes.CFUNCTYPE(None, ctypes.py_object)
  PyCapsule_New = ctypes.pythonapi.PyCapsule_New
  PyCapsule_New.restype = ctypes.py_object
  PyCapsule_New.argtypes = (ctypes.c_void_p, ctypes.c_char_p, PyCapsule_Destructor)
  capsule = PyCapsule_New(address, b"xla._CUSTOM_CALL_TARGET", PyCapsule_Destructor(0))
  return capsule

# Is it called a kernel on CPU?
@numba.cfunc(numba.types.void(numba.types.voidptr, numba.types.CPointer(numba.types.voidptr)))
def kernel_cpu(output, inbuffers):
  size = numba.carray(inbuffers[1], 1, numba.types.int32)[0] # TODO: Find the proper way to do this
  input = numba.carray(inbuffers[0], size, numba.types.float32)
  output = numba.carray(output, size, dtype = numba.types.float32)
  for i in range(size): output[i] = input[i] + 1

xc.register_custom_call_target("test", encapsulate(kernel_cpu.address), platform = 'cpu')

def translation_cpu(builder: jax.lib.xla_client.XlaBuilder, op):
  shape = builder.get_shape(op)
  assert shape.rank() == 1
  size_const = xb.constant(builder, shape.dimensions()[0])
  return  xc.ops.CustomCall(builder, b'test', operands = (op, size_const), shape = shape)

jax.interpreters.xla.backend_specific_translations['cpu'][prim] = translation_cpu

# TEST
prim.bind(7 * jnp.ones(20, dtype=jnp.float32))

It took a bit of fiddling about, but it's pretty easy in the end!

GPU, however, is proving a little more tricky.
Using Numba, I can make a kernel and get a handle for it.
@numba.cuda.jit("void(float32[:], float32[:])")
def kernel_gpu(input, output):
  i = numba.cuda.grid(1)
  output[i] = input[i] + 1

handle = kernel_gpu[1,10]._func.get().handle

I can also apply this kernel directly to JAX arrays through the standard Numba API. However, as JAX arrays are not writable and kernels can't return anything, I'm unable to get any output using this method. I've tested using a Numpy array as outputs and a JAX array as inputs, and that seems to work fine.
The step required to make this all work together is invoking the GPU kernel from CustomCall. This XLA page gives a good overview of the basic structure, and this cusolver source file in the JAX source is an example implementation.
I'm not sure what the best next step is here. I presume that the kernel invocation is going to need to be implemented in C++ proper rather than Numba, although I'm curious as to whether I can make Cython work. The only reason for my reluctance to do this properly is that I've done this all in Colab so far, so getting multiple files and compilers involved is a (probably necessary) step up in project complexity.
The cusolver.cc reference makes it all look quite complicated. There's manual device memory copying and stuff going on and I was hoping that things wouldn't need to get that complex, although maybe they do. I haven't grokked that file in detail yet. I was hoping that there may be a way to hijack the fact that Numba already does most of what we want under the hood - it already knows how to call the kernel with JAX inputs.
In theory all we need to implement is the equivalent of this sample from the XLA page that I linked:
void do_custom_call(CUstream stream, void** buffers,
                    const char* opaque, size_t opaque_len) {
  const float* in0 = reinterpret_cast<const float*>(buffers[0]);
  const float* in1 = reinterpret_cast<const float*>(buffers[1]);
  float* out = reinterpret_cast<float*>(buffers[2]);

  const int64 block_dim = 64;
  const int64 grid_dim = 2048 / block_dim;
  custom_call_kernel<<<grid_dim, block_dim,
                       /*dynamic_shared_mem_bytes=*/0, stream>>>(in0, in1, out);
}

This makes it seem like it may actually be quite easy! However, that sample is running through the NVCC compiler for the invocation and it's all getting a bit too much for my current approach where I'm working out of a Jupyter notebook! I think we're probably at the point where this needs to be a JAX source modification to be practical, although I'm not sure.
I'd appreciate feedback from knowledgeable people about what the best direction to take this in next is! Is it feasible to write a small C++ utility to handle the kernel invocation? Does this machinery already exist in JAX somewhere? Do I need to get NVCC involved? Is this something that it makes sense to attempt externally as I'm doing, or would it be much smoother to patch this into the JAX source?
This may be as far as I can justify taking this distraction for now, so I thought I would write up what I've done to at least inspire somebody else to take it further. I might do more if it feels approachable, although I'm quite far off track from the model I'm supposed to be training!

Hello all,
I have been coincidentally also working on this, just pushed the WIP to my fork
https://github.com/josipd/jax/blob/master/jax/experimental/jambax.py
Would it make sense for you to collaborate to avoid duplicate work? There are quite a few additional things that can be done (better), e.g. better automatic batching, understanding if the interface can be improved, and quite importantly CUDA support, which I have not touched at all, but you have made some progress.

That's interesting @josipd! It looks like we've done roughly the same thing, although you've done a bit more towards an API - mine was only a technical exploration.
I have some vague ideas for what a nice - slightly higher level - API might look like, but I've not put them together or tested them yet. I have this idea in the back of my mind that for certain types of kernels - particularly pointwise and pointwise like - it may be possible to share an implementation between CPU and GPU. I'd like to play with that but I haven't got that far in my explorations yet.
For me this is only actually useful if it runs on GPU. My CPU implementation was only an exploratory stepping stone to that. My CUDA progress so far is minimal - I've basically just read some documentation.
I'm not familiar with how NVCC works and that whole side of setting things up, or indeed if that's actually necessary. That became a significant hurdle for me building an independent implementation, but if we went down the route of forking it may turn out to be very simple to just add extra CUDA code into the existing project infrastructure.
I'm on a Windows machine and that's not supported for building, which was another reason I stopped where I did.
I'm interested in collaborating if we're both working on this, but I haven't yet decided to commit more time to it.

On our side, we are quite interested in CPU support. One of our motivation for a Numba / JAX bridge was that Numba can generate very efficient code for nested loops (typically, code like this or this). Also Numba supports native Python for loops, while in JAX one would need to use jax.lax or jax.experimental.loops. Is your main use case to write low-level CUDA kernels in Numba?

That's interesting @mblondel. I was almost wondering whether CPU support is even worth doing, but clearly from your use case it is. It sounds like it's definitely worth tidying my and @josipd's experiments up into a nice API.
For me, my main interest in custom kernels is performance. There are situations where JAX's JIT is significantly slower than what I can hand code and I'd like to be able to experiment with throwing a custom solution together. These would usually be quite small kernels that represent custom layers. I'd be defining them inline in a notebook as part of a model definition so brevity and ease are important. That's what makes Numba ideal.
I think that I may have actually made some progress on GPU support! I've got some separate parts that I think should work in theory, but I haven't put them all together and tested it yet, so we'll see. It's probably too much of a hack to be used as an official solution - I'm patching into Numba's internal kernel invocation machinery and I don't think it's considered a public or stable API.

I'm currently blocked on this Numba issue and a few other fiddly bits trying to wrangle Numba into doing what I want. This hack may prove more trouble than it's worth. I think it's clear that the proper way to do this is to integrate the kernel launching code into JAX properly but I don't think I'm the right person for that task. It's probably quite easy, so if somebody from the team with the right experience to pull it off would like to add that to jaxlib that would be great! Although...
Even the process of obtaining the kernel handle from Numba is proving problematic. The handle = kernel_gpu[1,10]._func.get().handle method I posted above breaks when upgrading Numba from 0.48.0 to 0.52.0. Clearly that's not a stable API. I think we would need Numba to expose something for us.
If we're relying on getting changes made to Numba anyway, there may be a smoother way forward. About a year ago, @seibert mentioned here that they would like to enable Numba cfuncs to launch Numba CUDA kernels. I believe that would cover everything that we need to do this.  The CustomCall could go into a standard Numba cfunc in the same way as I've done for the CPU, and that cfunc would call the Numba CUDA kernel. It's neat and allows this to be implemented in JAX with only Python changes.
@seibert, if you'd still like to get that put in then I think this becomes very easy. I don't think there's a feature request open for that on the Numba github yet so I'll probably add one soon and link back to here.

If that Numba change happened, I would probably be able to take on putting in a JAX PR for a nice wrapper API if we want that, as well as documentation. That appears to be what @josipd is also working on, so maybe we could collaborate on that.

Hey all,
Should we agree on the API and have at least the CPU version checked in soon? Looking at the XLA GPU convention, I think what I suggested could extend there as well once we have the necessary visibility changes in numba.

Hey all,
Should we agree on the API and have at least the CPU version checked in soon? Looking at the XLA GPU convention, I think what I suggested could extend there as well once we have the necessary visibility changes in numba.

Another a way to do this (other than CustomCall) would be to call back from JAX into Python using jax.experimental.host_callback.call: https://jax.readthedocs.io/en/latest/jax.experimental.host_callback.html (cc @gnecula)
It would be nice if host_callback.call() supported passing arrays on GPUs, but right now everything seems to passed onto the CPU as NumPy arrays.

Another a way to do this (other than CustomCall) would be to call back from JAX into Python using jax.experimental.host_callback.call: https://jax.readthedocs.io/en/latest/jax.experimental.host_callback.html (cc @gnecula)
It would be nice if host_callback.call() supported passing arrays on GPUs, but right now everything seems to passed onto the CPU as NumPy arrays.

Would the host_callback approach be competitive for speed when going through Python? Speed is one of the main reasons to want this functionality, so I think implementing it in the fastest possible way is important.
The GPU thing is similar - CPU is a good start for hacking something together, but GPU is probably required to make this actually useful for most people.
I've never used TPUs but I suppose they would ideally be supported too... Numba's roadmap suggests that TPU support may happen at some point, but that's listed as "2020 and beyond" and hasn't been updated since 2018, so I'm not sure if that's actually happening. I can't find any relevant github issues over there. Is it even possible for Numba to support TPUs given Google secrecy about them?

Would the host_callback approach be competitive for speed when going through Python? Speed is one of the main reasons to want this functionality, so I think implementing it in the fastest possible way is important.
The GPU thing is similar - CPU is a good start for hacking something together, but GPU is probably required to make this actually useful for most people.
I've never used TPUs but I suppose they would ideally be supported too... Numba's roadmap suggests that TPU support may happen at some point, but that's listed as "2020 and beyond" and hasn't been updated since 2018, so I'm not sure if that's actually happening. I can't find any relevant github issues over there. Is it even possible for Numba to support TPUs given Google secrecy about them?

Would the host_callback approach be competitive for speed when going through Python? Speed is one of the main reasons to want this functionality, so I think implementing it in the fastest possible way is important.

It looks like the current version of host_callback adds about 1 ms of overhead. This isn't something you would want to put in your inner loop, but could be fine in some contexts.

I am working on an alternative implementation of host_callback for cpu/gpu using customcall.

For what is worth, I've been recently experimenting with @josipd jambax and found that it has extremely low overhead on the CPU.
However, I have some complicated code that must run on the cpu inside of a larger jitted GPU block. I tried using host_callaback but the overhead is very large.
As GPU-customcalls are actually encoded as CPU functions that are supposed to encode kernels to the stream, my idea was to memcpy the data from gpu to cpu, call the numba-jitted function, then call memcpy back to gpu.
This is not exactly your standard use-case, but it might be an interesting one to support, since jax does not support mixed cpu-gpu jitted functions?
I was experimenting with adding support for this to jambax by doing something like
    def xla_gpu_custom_call_target(stream, inout_gpu_ptrs, opaque, opaque_len):
        # allocate temporary output cpu buffer
        if n_out == 1:
            args_out = (
                np.empty(output_shapes[0], dtype=output_dtypes[0]),
            )
        ...

        # allocate temporary input cpu buffer
        if n_in == 1:
            args_in = (
                np.empty(input_dimensions[0], dtype=input_dtypes[0]),
            )
          cudaMemcpyAsync(args_in[0].ctypes.data, inout_gpu_ptrs[0], input_byte_size[0], nb_types.int32(cupy_backends.cuda.api.runtime.memcpyDeviceToHost), stream)
        ...

        cudaStreamSynchronize(stream)
        numba_fn(args_out + args_in)

        if n_out == 1:
            cudaMemcpy(inout_gpu_ptrs[n_in+0], args_out[0].ctypes.data, output_byte_size[0], nb_types.int32(cupy_backends.cuda.api.runtime.memcpyHostToDevice))

However I'm seeing GIL crashes such as this.


Tradable SignUp is closed?

https://tradable.com/signup

gives me:

Oops! This typeform is private.
If you own this typeform,
log in to view it or make it public.

Hey @kennell, thanks for letting us know.
The sign up is now available:
https://tradable.com/signup


E2E: Quick fix on failing tests in LDAP

Summary
Fixed on tests in LDAP due to outdated use of uuid.
Ticket Link
None

@saturninoabril This PR is waiting on some build checks. Can't merge.

Thanks Prapti, will take care of it.


Sort component overrides on usage instead on insertion

1. Why is this change necessary?
When two plugins override a core component they are fooled into the option to control the override order.
2. What does this change do, exactly?
Postpone override sorting to overriden object building to manage the order more reliable.
3. Describe each step to reproduce the issue or behaviour.

Have a plugin that overrides a core component and adds more twig blocks
Have a second plugin that overrides the same core component to change content of the newly added twig blocks
To ensure the twig inheritance order add a high index as third parameter to Shopware.Component.override
Still be first in twig inheritance order as the index is ignored

So we have two Shopware.Component.override calls which I alias as thirdParty and me. me wants to extend thirdParty. As the order of plugins being injected into the administration and the way the browser loads the injected files is sort-of random the order of these calls is random as well. Lets iterate the possible orders and their outcome.
thirdParty(); // triggers push as no index is given
me(100); // triggers splice as an index is given which is similar to a push

This results in me being last but not by the fact that me passed in an index. Any index > 0 would have the same outcome. So this ok as outcome but not reliable.
me(100); // triggers push as no other overridees are registered
thirdParty(); // triggers push as no index is given

This results in me being first so me can't extend the block that is created by thirdParty. Any index me passes in won't help me when me is the first registered overridee. This is not working out and not reliable at all.
4. Checklist

[ ] I have written tests and verified that they fail without my change
[x] I have squashed any insignificant commits
[ ] I have written or adjusted the documentation according to my changes
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

Please add jest tests

I changed the code and do not store the config and index separately but store the index into the configuration. This way the storage structure is less changed and therefore less tests are in need to be changed and those who tamper with the registry right now don't have to change as well.
I added a test case. Thanks to @leichteckig for the admin test intro

That is why I still have this branch checked out locally 😅 thanks for the hint. I'll have a look at it.

This PR was closed due to inactivity. If this change is still important to you, feel free to create a new pull request.
For more information about our contribution guidelines, see https://docs.shopware.com/en/shopware-platform-dev-en/contribution/contribution-guideline


Re-assess Sui storage growth with TxBatches

https://docs.google.com/spreadsheets/d/1oYUuoNj2dVTv7bQ-qKQu26DKPbUMJl7DjV-y5ZUPUWg/edit#gid=719625127

The above only has one axes: TPS
We need a second one based on transaction batch size, and varying it.  The first time this was done there was no batching, or equivalently batch size == 1.
Also need to analyze what happens if every object is kept (full node?  Gateway?)

this is now done.

This is pretty much done.


Add support for building/pushing images via GCB

Shamelessly patterned after kubernetes-sigs/boskos with some mods:

don't paramaterize go_version
don't use _output/bin
explicitly pass DOCKER_ env vars to images/build.sh
add a test-e2e target

I also took the liberty of renaming cmd/controller to cmd/secret-sync-controller
ref: https://github.com/kubernetes-sigs/k8s-gsm-tools/issues/2

I think I prefer to have one for the sync controller and one for the rotator.

Discussed offline

we'd like to see an image per binary
will be structured as cmd/{binary}

/cc @b01901143

/lgtm


Add text inside Colors

Is there a way to achieve something like below using Colors or some other plotter?

I tried using Colors and TextMesh but haven't been able to figure out how to make them work together like this.

Perfect. I thought we can only use Chunk once for a given split. It works in this scenario, but in case where I can't split the plot, is there another way to achieve it, or is this the only way for now?
Again, thanks for the help. It's really appreciated.

Yes, the Chunk can be used multiple times. Can you give an example of when you can't split the plot but want to add text?
I'm not sure if this is what you want, but if you want to label multiple splits with the same name, a FixedChunk allows you to merge multiple chunks, the downside is that it will not reorder if you add a dendrogram.

Let's say that in the above plot, I've split based on TME, and I also want to add some text on the Biopsy location row or Surgery row (could be its label, or the number of samples or anything else). Can I achieve that in any way?

In the current Marsilea, this is impossible. In Surgery, you have green blocks in two places, so it's difficult to tell where to put the text. But if you really want this feature, you can implement your own RenderPlan.
If you want to add extra text, I would add it to the label, something like Surgery (Yes: 10, No: 20).
By the way, if you plan to use Marsilea in a publication, please consider citing our preprint, it will help a lot in keeping this project alive, https://doi.org/10.1101/2<IP_ADDRESS>0236

Yes, I understand that the above example wasn't a perfect one (just sent a screenshot of whichever one was readily available at that time).
Sure thing. I'll definitely cite it if I use it in my publication. Thanks for such a great tool.


Add ESLint no-unused-vars rule

Checklist

[x] npm install && npm test passes
[x] commit message follows commit guidelines

Description of change
Adds the no-unused-vars ESLint rule. Can add npm run lint to nodegyp-test-commit if people would like that.

CI: https://ci.nodejs.org/job/nodegyp-test-commit/298/

Full CI: https://ci.nodejs.org/job/nodegyp-test-pull-request/58/

Can add npm run lint to nodegyp-test-commit if people would like that.

I'd rather we add npm run lint to npm test (see https://github.com/nodejs/node-gyp/pull/1336#issuecomment-406908320)

@gibfahn Added npm run lint to npm test, but looks like CI came back with some interesting Windows errors (cc @joaocgreis): https://ci.nodejs.org/job/nodegyp-test-pull-request/68/

CI (https://ci.nodejs.org/job/nodegyp-test-pull-request/77/) is passing now besides for Node.js v4.x, but support for that release line is being removed soon from the master branch.
PTAL @gibfahn @joaocgreis

Windows fix LGTM. The rest of the diff looks reasonable at a glance but I didn't test.

@maclover7 just to confirm, all the fixes come from eslint warnings right?

Final CI before landing: https://ci.nodejs.org/job/nodegyp-test-pull-request/81/

Landed in b2e5cf0


Added options to skip analysis

I've added an option to skip the analysis part after the command line tool is done.
In our situation we will do not need logging of the errors at that moment of time, we do the analysis of the result at a later stage. That's why we needed an possibility to skip it.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: janniksam sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@janniksam apologies for not getting back to you sooner about this.  Was this PR associated with an issue that was raised on the repository?  Our contributing guidelines mention that an issue should first be created, prior to opening a PR.

Hey, I am sorry for not creating an issue for the PR. It came from a personal experience using both "jetbrains tools".
I will have to recreate the PR anyways, because the repository was deleted by accident. But for now, do you have any opinion about the code?

From a brief inspection of the code, I have no objections to it getting merged in.  It would help if you could provide a bit more information in the issue that you create as to why exactly you want/need this.  That will help the PR review that will then be done.
Thanks

I will recreate this pullrequest later. #2768

Pullrequest reopened with #2769


Cannot pass startIcon to custom Button variant

Description
I expect that using the startIcon prop, I can define a button variant that has a specific icon by default
CodeSandbox/Snack link
https://snack.expo.dev/@localjo/ec312b
Steps to reproduce
Try to create a custom button variant with an icon:
      Button: {
        variants: {
          mine: {
            bg: 'red.500',
            _icon: { // Not working
              as: Feather,
              name: 'check',
              color: 'white',
              size: 'sm',
            },
            startIcon: { // Not working
              as: Feather,
              name: 'check',
              color: 'white',
              size: 'sm',
            },
            _startIcon: { // Not working
              as: Feather,
              name: 'check',
              color: 'white',
              size: 'sm',
            },
          },
        },
      },

The button will render with no icon. (see Snack)
NativeBase Version
3.4.25
Platform

[ ] Android
[ ] CRA
[X] Expo
[ ] iOS
[ ] Next

Other Platform
No response
Additional Information
Adding a custom _icon to an IconButton variant works fine, so I would expect it to work here too. May be related to #5369

Hey @localjo,
Thanks for reporting. We will look into it.


Fixed issue with Files launcher not getting copied to output directory

Resolved / Related Issues
Items resolved / related issues by this PR.

Closes #10381

Validation
How did you test these changes?

[x] Built and ran the app

It seems like the vcxproj is causing installation issues, is there any other project format we can use?
App installation failed with error message: Merge failure for shared merged PRI file : error 0x80070490


LangChain4j 0.29.0 + Easy RAG

When using the easy RAG extension

The user has to add an extension that provides a chat model and an embedding model. An embedding model gets then registered automatically if no other embedding model usage is detected.
An EasyRetrievalAugmentor is created automatically, wiring itself to the (potentially automatically created) embedding model. If the application provides an explicit retrieval augmentor, it will be used instead of the EasyRetrievalAugmentor.

Awesome!
I'll take a close look today

I'm seeing a failure in OpenAiChatLanguageModelSmokeTest,
assertThat(loggedRequest.getHeader("User-Agent")).isEqualTo("Resteasy Reactive Client");

fails:
org.opentest4j.AssertionFailedError:
expected: "Resteasy Reactive Client"
 but was: "langchain4j-openai"

This seems to be due to https://github.com/langchain4j/langchain4j/pull/733
Shall I update the user agent assertion to expect "langchain4j-openai"?

Shall I update the user agent assertion to expect "langchain4j-openai"?

Nope, since the test expectation is exactlty what we need.
There is a good chance that the client integration is completely broken :(. I'll have to check

I checked and were good to update the test as you mention

Hm, using OCR in Tika requires a separate library (Tesseract) to be installed in the system. We should probably not rely on it being installed during tests... I'm going to rework the test that relies on it.

Applied all @gsmet 's doc suggestions now


make DeletedAt a pointer of Time

An alternate implementation for #41
Update Server.DeletedAt to be of type *time.Time

Codecov Report

Merging #42 (aedfe84) into main (f2be556) will increase coverage by 0.16%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
+ Coverage   73.53%   73.70%   +0.16%
==========================================
  Files          22       22
  Lines         941      947       +6
==========================================
+ Hits          692      698       +6
  Misses        158      158
  Partials       91       91

Flag
Coverage Δ

unittests
73.70% <100.00%> (+0.16%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

pkg/api/v1/server.go
72.72% <100.00%> (+4.30%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f2be556...aedfe84. Read the comment docs.


Bibs transformation task should flag structurally ambiguous leaders

I have a record which starts like this:
=LDR  00760nam a2200253 P 4500
=000  10$aWomack,\J.P.
etc
While the presence of the 000 does not appear to actually be causing problems in FOLIO, it disappears from the SRS record if the record is edited and re-saved in QM.

As I understand:

Pymarc -- and seemingly some other ILSs consider the "000" as a regular MARC field with no special characteristics or length restrictions. This is why our tools don't flag it.
MARCEdit's record structure validation tool interprets the "000" as a Leader field with an invalid length.
FOLIO's MARC cataloguing tools consider the "000" an invalid MARC field and removes it on import/QM saving.
FOLIO's OAI PMH harvest simply omits the 000, so it shouldn't hurt any discovery catalog builds using OAI-PMH.


Done event

Added a "done" event, triggered after the last message is parsed to signal the end of the current mail batch. It might be useful when you don't want the script to keep running and disconnect the client after the work is done:
  mailListener.on("done", function(){
    mailListener.stop();
  });

+100000

Any update on this PR?

Any examples of doing a complete disconnect after running this event?


Would it be possible to add proxy support?

That way, I could access this outside the 'supported' countries.

Hi, @Dima-369
I would like to let you notice that unofficial-claude2-api now supports HTTP proxies ( non-authenticated ), starting from version 0.1.8
Come have a try! :)

Hi Dima, I currently access it from Singapore which isn’t in the list of supported countries, and it works well.
You only need to register once with the VPN of the registered country, after that you can access it from anywhere.
Is there any issue you’re facing?

Is there any issue you’re facing?

Yeah, I get this. I added print(lines) to def get_answer(self,prompt): to see the error. No idea how to work around this though.
Found old conversations, using the most recent one
['{"error": {"type": "permission_error", "message": "We are unable to serve your request"}}']

I get the same error when using claude.create_new_conversation() before.

can you let me know which country you are accessing the api from?

Germany.

and when did the issue first happen?

I think I always had issues using this package, I just wanted finally note it down ;)

and are you sure you're copying the whole session key cookie from the browser, because this error sometimes comes because of that.
I jut tried accessing the api, and it worked for me, I am also accessing it from a non supported country

I am using this code. Is this incorrect? I inserted ... in a few places, but did not touch the cookie keys like sessionKey=.
from claude import Claude

cookie = "intercom-device-id-lupk8zyo=...d1835ed5; __cf_bm=Vp4Tq1sik_Q_YAQ...Ms8k-1695200839-0-AVkRmai4aCd5PD/04v4u6C6g+Y3p...T1ByeuV+26YJUgMmJ/CNrZp4g+2vII9HPavmFCa5nc=; cf_clearance=8qSqujGm...PAswE-1695200841-0-1-754722c6.8446846a.22467d26-0.2.1695200841; sessionKey=sk-ant-sid01-y5...kDUmXTabK3rcg8ZCNoHD_lgcvqjP60E...AAA; intercom-session-lupk8zyo=b1M3NU...zZ2RlWm1BNElieWtTU3VDWmgrMzhkQzV3cGFZNjVRYW...RS3EwaWt4SnM5Zz09--35b234ffa70fa7a2c24...86"
claude = Claude(cookie)
claude.create_new_conversation()

prompt = "php strip string"
response = claude.get_answer(prompt)
print(response)

this is what I did and it is running, checked once again
from claude import Claude
cookie = "sessionKey=sk-...;"
claude = Claude(cookie)
prompt = "Hello, Claude!"
response=claude.get_answer(prompt)
print(response)

try using just the session key maybe, also make sure you have the latest version of the package installed

try using just the session key maybe, also make sure you have the latest version of the package installed

I have the latest version. Just using the session key throws the exact same error. Guess, I'm out of luck since you can't reproduce it. Let's just close this issue then?

are you able to use it online, like from the official claude website?

Yes, I access it via the Opera VPN.

I can try adding some more headers to see if it can be fixed, because usually permission denied is because of a wrong cookie or authentication, as if it was a location issue I would be facing it too.
Will let you know if I find anything.

curl_cffi.requests.errors.RequestsError: Failed to perform, ErrCode: 77, Reason: 'error setting certificate verify locations:  CAfile: \Python\Python310\lib\site-packages\curl_cffi\cacert.pem CApath: none'

Claude just added support for many countries, so can check if its working not for you or not?

Claude just added support for many countries, so can check if its working not for you or not?

Hey, cool, that you mention it! I just tested my exact same code above and it works flawlessly in Germany without a VPN now.
Thanks :)

okay perfect I'll close this issue then


TypeError: object of type 'NoneType' has no len()

I got the following errors:

File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/c/e.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/f/a.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/f/b.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/f/ba.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/f/c.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/f/f.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/l/a/g.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/l/a/h.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/l/a/i.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/l/b/h.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/l/b/i.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/e/l/b/j.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/a/a/d.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/a/c.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/a/g.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/a/i.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/a/j.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/a/k.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/a/n.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/d/a.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/d/a/a.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/d/a/c.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/d/c.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/b/f/ah.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/d/a/e.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/d/a/i.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/d/a/n.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
org/a/s/d/a/s.class Traceback (most recent call last):
File "/mnt/sda4/project/android/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/mnt/sda4/project/android/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()

Could you please post the apk you are trying to translate, and the way you invoked Enjarify?

Could you please post the apk you are trying to translate, and the way you invoked Enjarify?

I have the same error. The dex file I try to translate is boot-framework_classes.dex .
boot-framework_classes.zip
I invoked Enjarify by the following command :
python3 -O -m enjarify.main boot-framework_classes.dex

Could you please post the apk you are trying to translate, and the way you invoked Enjarify?

I have the same error. The dex file I try to translate is boot-framework_classes.dex .
boot-framework_classes.zip
I invoked Enjarify by the following command :
python3 -O -m enjarify.main boot-framework_classes.dex

my specific error :
android/gesture/GestureUtils.class Traceback (most recent call last):
File "/home/abcd/tools/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/home/abcd/tools/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
android/hardware/location/ActivityRecognitionHardware.class Traceback (most recent call last):
File "/home/abcd/tools/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/home/abcd/tools/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()

Could you please post the apk you are trying to translate, and the way you invoked Enjarify?

my specific error :
android/gesture/GestureUtils.class Traceback (most recent call last):
File "/home/abcd/tools/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/home/abcd/tools/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()
android/hardware/location/ActivityRecognitionHardware.class Traceback (most recent call last):
File "/home/abcd/tools/enjarify/enjarify/main.py", line 38, in translate
class_data = writeclass.toClassFile(cls, opts)
File "/home/abcd/tools/enjarify/enjarify/jvm/writeclass.py", line 122, in toClassFile
pool.write(stream)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 135, in write
self._writeEntry(stream, item)
File "/home/abcd/tools/enjarify/enjarify/jvm/constantpool.py", line 104, in _writeEntry
stream.u16(len(val))
TypeError: object of type 'NoneType' has no len()

Same problem here, enjarify does a much better job than dex2jar, but still getting those failures on many classes... is the tool still maintained?

Sorry, I forgot about this completely.

I looked into this and the class in question appears to be trying to load a float as a class literal. Are you sure it's valid?

In my case I suspect that it might possibly be caused by Dexguard... at least it is known to inject nonsense control flow to trip up decompilers, so maybe this is another trick to break DEX parsers? However, I hope that it can be handled more gracefully on the enjarify side. The APK in question is com.huawei.health FWIW...

FWIW I'm seeing the same issue with Spotify <IP_ADDRESS>1 (version with assets stripped here). I patched enjarify to replace the invalid constants with the string "fail" and got this output (from fog.class):
L26:    iastore
L27:    astore 5
L29:    ldc Class fail
L31:    astore 6
L33:    aload 6
L35:    aload 5
L37:    invokestatic Method java/lang/reflect/Array newInstance (Ljava/lang/Class;[I)Ljava/lang/Object;
L40:    checkcast [[B

The bytecode seems like it's trying to do the right thing, and doesn't appear to be obfuscated either. I'm not nearly as familiar with Android as I am with Java so hopefully this is interesting enough for you to take a look

Sorry, I keep forgetting about this. Hopefully, I'll get around to it soon.

So what would be the correct behavior here? I don't want to just silently emit nonsense code either.

So the original dalvik is nonsense, then? I thought in Spotify's case it could've been a bug in enjarify since there seemed to be no obfuscation applied beyond name mangling.
I guess it'd be ideal if the rest of the class could be translated, either by replacing the constant with something representing an invalid value or omitting the method bodies of methods that use that constant. Failing that, handling this error gracefully (log that the specific class contains an invalid cp entry?) would still be better than the current situation.

This bug can be triggered with the following code:
int[][] a = new int[2][3];
Example APK:
app-debug.apk.zip
The bad thing happens when parameter of const-class is a primitive type.

Sorry, I've been busy with other stuff and am having computer troubles.

This also effects Old School Runescape:
https://www.apkmirror.com/apk/jagex-games-studio/old-school-runescape/
as of 188.5

I'm not sure what the technically correct thing to do here is, but I pushed a change which should help.


bug: Commands in sniprun virtual mode are not supported

Did you check docs and existing issues?

[X] I have read all the lazy.nvim docs
[X] I have searched the existing issues of lazy.nvim
[X] I have searched the exsiting issues of plugins related to this issue

Neovim version (nvim -v)
NVIM v0.9.0-dev-519+g2d8bbe468-dirty
Operating system/version
MacOS Big Sur 11.1
Describe the bug
When I use sniprun's virtual mode command, it throws an error

Steps To Reproduce
Use the following configuration
{
  "michaelb/sniprun",
  build = "bash ./install.sh",
  cmd = { "SnipRun", "'<,'>SnipRun" },
  lazy = true,
}

Expected Behavior
Can be used normally
Repro
No response

As the error says, "'<,'>SnipRun" is not a valid command name. You want to just keep cmd={"SnipRun"}


weather prediction with RNN - loading source data directly from the website

I made small changes to the notebook about weather forecasting, so that the source data is loaded from the referenced website. This is done using pandas:
https://notebooks.azure.com/denfromufa/libraries/pmlc/html/Lectures/Lecture_11_LSTM/6.3-advanced-usage-of-recurrent-neural-networks.ipynb
@fchollet are you interested in accepting this small change in a pull request?

@denfromufa Denis, can you show prediction example? I can't understand what the structure of request has to be. Also, i don't understand where temperature is set as aim. Thnx!


Tests broken after upgrade doctrine/dbal to 2.10.3

Laravel Version: v7.27.0
PHP Version: 7.4.3
Database Driver & Version: Sqlite

Description:
After upgrading from 7.25.0 to v7.27.0 tests getting broken.  Im getting query exceptions when using DatabaseMigrations, RefreshDatabase at same time.
It seems to related to https://github.com/laravel/framework/issues/34091
Production project

Fresh project

Downgrading doctrine/dbal from 2.10.3 to 2.10.2 fixes problem.
Steps To Reproduce:
Upgrade 7.27.0 and create any basic test with  DatabaseMigrations, RefreshDatabase. If i use just one of them tests works fine.

I have the same problem and spent some time investigating it.
What happened is that \Doctrine\DBAL\Platforms\SqlitePlatform::supportsForeignKeyConstraints has been changed to true in 2.10.3 (if you set this to true on 2.10.2, the same problems happens).
I don't know why, but it seems that doctrine/dbal does not create indexes when creating a table with foreign keys, but when changing an existing table with foreign keys, it tries to remove some non-existent index.

Ca cofirm that, the https://github.com/doctrine/dbal/commit/85a983c3f8d6447c4441832477def1c28d57bee9 commit is the one that breaks it in dbal for sqlite

Facing a similar problem here also after upgrading, seems not directly laravel but doctrine/dbal 2.10.3, switching to v2.10.2 fixed test failing sqlite failing:
General error: 1 no such index: IDX_DC8C84A116FE72E1 (SQL: DROP INDEX IDX_DC8C84A116FE72E1)
PHP 7.4.8
laravel/framework: v7.27.0
doctrine/dbal 2.10.3

Feel free to share your information on the Doctrine issue I created: https://github.com/doctrine/dbal/issues/4243

@hakanersu there are 2 exceptions in the code:
https://github.com/laravel/framework/blob/caec40ed2695c2aa84b5eb195c822e3a961fc445/src/Illuminate/Database/Connection.php#L670-L672
The one that appears in your screenshots comes from Laravel, and is triggered by the one line 670 , that is issued by doctrine/dbal.
When posting an exception you should:

prefer text over screenshots so that people can copy paste from them, and to be more friendly to search engines;
include all exceptions, not just the first one.

If you still have access to the stack trace of the second exception, please post it as text on the page linked by @taylorotwell  above, it will be helpful :pray:

I don't know why, but it seems that doctrine/dbal does not create indexes when creating a table with foreign keys

@uuf6429 was the table created with the latest version of doctrine/dbal?

I don't know why, but it seems that doctrine/dbal does not create indexes when creating a table with foreign keys

@uuf6429 was the table created with the latest version of doctrine/dbal?

Yes - this happens before running tests, when running migrations through artisan. The migrations are all based on laravel blueprint.

Is this method used at any point, and if yes, is $name null?
https://github.com/laravel/framework/blob/caec40ed2695c2aa84b5eb195c822e3a961fc445/src/Illuminate/Database/Schema/Blueprint.php#L537-L550
Shouldn't that result in
CREATE TABLE tasks (
    id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
    account_id INTEGER NOT NULL,
    user_id INTEGER DEFAULT NULL,
    subject VARCHAR(255) NOT NULL COLLATE BINARY,
    start_date DATETIME NOT NULL,
    state INTEGER DEFAULT 0 NOT NULL,
    task_type INTEGER DEFAULT 0 NOT NULL,
    task_queue_id INTEGER NOT NULL,
    created_by_type VARCHAR(255) DEFAULT NULL COLLATE BINARY,
    created_by_id INTEGER DEFAULT NULL,
    created_at DATETIME DEFAULT NULL,
    updated_at DATETIME DEFAULT NULL,
    content CLOB DEFAULT NULL COLLATE BINARY,
    end_date DATETIME DEFAULT NULL,
-    CONSTRAINT 0 FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE,
-    CONSTRAINT 1 FOREIGN KEY (account_id) REFERENCES accounts (id) ON UPDATE NO ACTION ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE
+    FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE SET NULL NOT DEFERRABLE INITIALLY IMMEDIATE,
+    FOREIGN KEY (account_id) REFERENCES accounts (id) ON UPDATE NO ACTION ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE
)

Note that this syntax does not even appear in SQlite's official doc about foreign keys

@greg0ire
Here is the actual SQL created when I create a table with a foreign key using Laravel:
create table "posts" ("id" integer not null primary key autoincrement, "user_id" integer not null, "body" varchar not null, "created_at" datetime null, "updated_at" datetime null, foreign key("user_id") references "users"("id"))

@greg0ire
When attempting to change the column, here is an array of SQL statements doctrine/dbal informs us should be run to make the change on SQLite:
array:7 [
  0 => "DROP INDEX IDX_885DBAFAA76ED395"
  1 => "CREATE TEMPORARY TABLE __temp__posts AS SELECT id, user_id, body, created_at, updated_at FROM posts"
  2 => "DROP TABLE posts"
  3 => "CREATE TABLE posts (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER NOT NULL, created_at DATETIME DEFAULT NULL, updated_at DATETIME DEFAULT NULL, body CLOB NOT NULL COLLATE BINARY, CONSTRAINT 0 FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE NO ACTION NOT DEFERRABLE INITIALLY IMMEDIATE)"
  4 => "INSERT INTO posts (id, user_id, body, created_at, updated_at) SELECT id, user_id, body, created_at, updated_at FROM __temp__posts"
  5 => "DROP TABLE __temp__posts"
  6 => "CREATE INDEX IDX_885DBAFAA76ED395 ON posts (user_id)"
]

Thanks, it explains a lot! I didn't understand why we were reading information from posts before creating it, didn't know it was dropped then re-created instead of altered.
@MyIgel contributed https://github.com/doctrine/dbal/pull/4246 yesterday, and I think it fixes the "reading information from posts before dropping it" part.
Can people here please test<EMAIL_ADDRESS>and report if it does fix the issue for them?

@greg0ire
I installed it (Upgrading doctrine/dbal (2.10.3 => 2.10.x-dev cd2ddda)).
I still receive the same error:
General error: 1 no such index: IDX_885DBAFAA76ED395 (SQL: DROP INDEX IDX_885DBAFAA76ED395)

Ok so there are in facts 2 bugs? One with query number 0 and one with query number 3, and I think @MyIgel fixed the one with query number 3 with doctrine/dbal#4246 . No idea why the DBAL thinks there should be an index in addition to the foreign key yet.

By the way, a bit late, but I have a further suggestion (which worked in my case).
Depending on how many laravel users have this problem, we could add the following to laravel/framework's composer.json, if it doesn't happen often, this could also be done for individual use-cases:
    "conflict": {
        "doctrine/dbal": "2.10.3"
    },

For the moment I have this workaround/experiment that is ugly but works: https://github.com/greg0ire/dbal/pull/3
I think the issue could also be fixed in Laravel by making the thing that creates foreign key (so Blueprint?) also create indices on foreign keys, and by making sure foreign keys are named (by using the CONSTRAINT blah FOREIGN KEY… syntax).

@greg0ire this may be related as well
https://github.com/symfony/symfony/issues/38067

Too early to tell, but it's possible that it's at least related to the same pull request. Thanks for linking to that, I will keep an eye on it.

Adding <server name="DB_FOREIGN_KEYS" value="(false)"/>  in phpunit.xml fixed the tests for me.

Thanks, it explains a lot! I didn't understand why we were reading information from posts before creating it, didn't know it was dropped then re-created instead of altered.
@MyIgel contributed doctrine/dbal#4246 yesterday, and I think it fixes the "reading information from posts before dropping it" part.
Can people here please test<EMAIL_ADDRESS>and report if it does fix the issue for them?

A little context that might help, I learned recently that sqlite does not allow alter statements, so DBALs tend to recreate the table with the new structure.

doctrine/dbal (2.10.x-dev 03bc93b) fixes it for me.

We have released the bugfix as 2.10.4, please confirm the bug is fixed and close this.

Awesome, thanks.

You're very welcome, sorry for the trouble actually, and thanks for to the Laravel community for helping out with the reproducer, PRs and investigations :)

@greg0ire no sorry needed. Thanks for all your work 👍


specifying a custom center via map_config

hi there,
i was trying to give a map with loads of markers a custom center point, "default_point" would not work, as there are location elements in location_selector, so i tried to add a center via map_config: {center: LatLng(lat: 52.539366, lng: 13.387549)} but to no avail ... are there any other ways to achieve that? am i missing sth.?
cheers from germany, and thx for the plugin, great job! -f

@metalguru
I know this is a few months old, but how do you actually set the center Lat/Lng?


image operation image::imageops => add horizontal-gradient

introduced in 0.23.9, #569
Thank you for taking the time to look at this feature request. If you want to help by implementing the feature, thanks!; I've added some ideas on how to implement it below. If there are questions, always feel free to ask!
PR 1:

[ ] Create an issue for this step, e.g. titled Image Operation engine: add horizontal-gradient

[ ] Implement horizontal-gradient operation

[ ] Add an ImgOp for the operation: https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_image_engine/src/lib.rs#L16
[ ] Implement the operation: https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_image_engine/src/engine.rs#L110
[ ] Add tests to verify the operation works as expected. You can use the examples set by other operations. Consider using parameterized tests for similar test cases; the dependency should already exist.

PR 2 part 1:

[ ] Create an issue for this step, e.g. titled Image Operation parsing: add horizontal-gradient

[ ] Consider syntax which works for both cli ops and the --apply-operations script. This means that an operation should be able to be parseable without introducing ambiguity with both the  the Pest parser used for apply-operations script, as well as the cli ops parser used for the cli interface. Additionally, this last syntax should also be compatible with Clap, which is used for the general cli interface (but is inconvenient for the cli ops). The next points will describe the exact steps to implement these parsers. I would recommend doing both in one go to ensure compatibility with each other. You may consider dividing the actual work to multiple PR's, but doing so is optional.

PR 2 part 2:

[ ] Implement cli ops and --apply-operations script parsers

[ ] cli ops:

[ ] Add an OperationId for the operation: https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_cli_ops/src/operations.rs#L18
[ ] Implement takes_number_of_arguments: https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_cli_ops/src/operations.rs#L66
[ ] Implement create_instruction: https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_cli_ops/src/operations.rs#L113

[ ] To recognise values, we used the ParseInputsFromIter, which will be re-usable when implementing the Pest parser in part 3. Whether you should add a new type and implementation depends on the arguments required for the operation. If the operation arguments are complex, you can use a wrapper (example, instead of an argument tuple or primitive type.

PR 2 part 3:

[ ] --apply-operations script:

[ ] Add operation to Pest: https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_parser/src/grammar.pest#L76
[ ] Add a Rule for the operation to the Pest PEG file: https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_parser/src/grammar.pest#L36
[ ] Match the Rule you just made against the Instrs, and transform the Pest Pair(s) to the ImgOp you added at the start of this issue (This ImgOp is wrapped in by the Instr enum): https://github.com/foresterre/sic/blob/33acebfd52b7b8678c433de57513c862695fc30c/components/sic_parser/src/rule_parser.rs#L26. Here you can re-use the value parser used in part 2.
[ ] Add tests to verify parsing works as expected. You can use the examples set by other operations. Consider using parameterized tests for similar test cases; the dependency should already exist.

It is; if you have questions feel free to ask :)

Thanks!
i have implemented the feature successfully but I'm suspicious to commit it because of that the
(horizontal/vertical)-gradient functions provided by image crate Fill the input image with gradient color, but not overlaying the input-image with a gradient, is this the expected output behavior of this feature request?
PS: sorry for my bad English, I'm not a native English speaker.

i have implemented the feature successfully

Nice work!

but I'm suspicious to commit it because of that the
(horizontal/vertical)-gradient functions provided by image crate Fill the input image with gradient color, but not overlaying the input-image with a gradient,

basically now the command:sic -i input.png -o out.png -x "horizontal-gradient rgba(255, 0, 0, 255) rgba(0, 0, 255, 255)" outputs an image with Only a gradient from red to blue, but not putting the gradient colors as a filter for the input image. is this the expected output behavior of this feature request?

If I understand the image docs correctly, it indeed fills an image buffer with a certain gradient. We can do the overlay part ourselves.
One way to approach this is by creating a new ImageBuffer on which the gradient is applied. Then we can interpolate the buffer in the SicImage with this gradient.

ah i see, thanks for your help! i will make a pr as soon as i finish, i think i have to read image crate documentation more and teach myself more about image processing.

Progress: it works!

closed by #840
TODO's:

Add to readme and changelog, see #843


Error:io.UnsupportedOperation: fileno

I've upgrade to the latest version 0.39.17.
It show the following msg after typing import pyansys:
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import pyansys
  File "D:\Python\Python37\lib\site-packages\pyansys\__init__.py", line 5, in <module>
    from pyansys.archive import (Archive, write_cmblock, write_nblock,
  File "D:\Python\Python37\lib\site-packages\pyansys\archive.py", line 11, in <module>
    import pyvista as pv
  File "D:\Python\Python37\lib\site-packages\pyvista\__init__.py", line 26, in <module>
    faulthandler.enable()
io.UnsupportedOperation: fileno

That's a bug within pyvista that will be patched tomorrow in 0.24.1.  For now, try installing pyvista==0.23.2

OK!
Thank you!

We've released pyvista==0.24.1.  Please us that.  I'm going to also set the min requirement so that this doesn't happen within pyansys.


Meteor methods with client stubs not supported for waitOn()? Promise not resolved Error: Can't set timers inside simulations

I'm having an issue:

Version of flow-router-extra you're experiencing this issue: 3.9.0 and 3.10.1
Version of Meteor you're experiencing this issue: 2.15
Browser name and its version (Chrome, Firefox, Safari, etc.)? Chrome Version 124.0.6367.119 (Official Build) (arm64)
Platform name and its version (Win, Mac, Linux)? Mac
If you're getting an error or exception, please provide its full stack-trace as plain-text or screenshot

[ostrio:flow-router-extra] [route.wait] Promise not resolved Error: Can't set timers inside simulations
  at withoutInvocation (meteor.js?hash=7dd187e6c4c7dc8731ddaf9d1d993d3c3ba5a732:647:13)
  at bindAndCatch (meteor.js?hash=7dd187e6c4c7dc8731ddaf9d1d993d3c3ba5a732:659:33)
  at Meteor.setTimeout (meteor.js?hash=7dd187e6c4c7dc8731ddaf9d1d993d3c3ba5a732:674:21)
  at subWait (route.js:108:22)
  at route.js:128:11
  at meteor.js?hash=7dd187e6c4c7dc8731ddaf9d1d993d3c3ba5a732:1343:22

This does not work for me:
methods.js (imported on both client and server):
// METEOR METHOD WITH CLIENT STUB
Meteor.methods({
	async 'simulation.test'() {
		if (Meteor.isServer) {
			const slowOperation = () => new Promise(resolve => Meteor.setTimeout(resolve, 1000))
			return await slowOperation()
		}
	}
})

routes.js, imported on the client:
FlowRouter.route('/', {
   		name: 'test',
		waitOn(params, query, ready) {
			return new Promise(async (resolve, reject) => {
				try {
					console.log('calling simulation.test...')
					await Meteor.callAsync('simulation.test')
					console.log('done.')
					resolve()
				} catch (err) {
					reject(err)
				}
			})
		},

		// ...action...
})

Exception thrown, since you are calling Meteor.setTimeout here:
    const subWait = (delay) => {
      timer = Meteor.setTimeout(() => {           // PROBLEM
        if (this.checkSubscriptions(subscriptions)) {
          Meteor.clearTimeout(timer);
          _data = getData();
          if (_resources) {
            whileWaitingAction();
            getResources();
          } else {
            next(current, _data);
          }
        } else {
          wait(24);
        }
      }, delay);
    };

If I change the Meteor method to have no client stub, the exception goes away:
(...routes.js same as above...)
methods.js
if (Meteor.isServer) {
	Meteor.methods({
		async 'simulation.test'() {
			const slowOperation = () => new Promise(resolve => Meteor.setTimeout(resolve, 1000))
			return await slowOperation()
		}
	})
}

Definiing waitOn() as follows instead does NOT seem to cause the exception:
			return new Promise((resolve, reject) => {   // NOTE: No 'async' here
				try {
					console.log('calling simulation.test...')
					Meteor.call('simulation.test', (err, result) => {    // NOTE: Meteor.call rather than 'await Meteor.callAsync'
						console.log('done.')
						resolve()
					})
				} catch (err) {
					reject(err)
				}
			})

Originally I was definiing waitOn() with return new Promise(async (resolve, reject) => ... and calling a ValidatedMethod, which always defines a client stub as far as I can tell, like await myValidatedMethod.callAsync(), which caused this exception.
Would be great if you could support client stubs, but anyway, any suggestions here? Am I doing something unreasonable? Thanks.

@drone1 generally I'd say — Use stubs only for user-interaction actions.
What expected behavior you assuming when waitOn receives stub then server response, page/route reload?

Hey @dr-dimitru!
Maybe it would be helpful to throw an exception before Meteor.setTimeout() if in simulation? I'm not sure if this is an easy one-liner, since the code is running outside of a method, you may not be able to check isSimulation as you can within a Meteor method. Maybe not worth it.
The behavior I'd expect is to not get an exception thrown by Meteor.setTimeout() being called, and the code moving along as expected as data comes back from the server.
The Meteor docs recommend client stubs for all methods IIRC so I'd gotten into the habit of doing that.
Thanks for getting back.


dynamic component in jsx

What problem does this feature solve?
what I really want to say is like the code below, I have tried in jsx, but it does't wirk
import Todo from './Todo.js'
import  NotTodo from './NotTodo .js'

export default {
  render (h) {
    const Component = someJudge() ? Todo : NotTodo
    return <Component />
  }
}

there is an example from another mvvm tool R, that is close to my expression
import R from 'r';
import { PhotoStory, VideoStory } from './stories';

const components = {
  photo: PhotoStory,
  video: VideoStory
};

function Story(props) {
  const SpecificStory = components[props.storyType];
  return <SpecificStory story={props.story} />;
}

What does the proposed API look like?
  render (h) {
    const Component = someJudge() ? Todo : NotTodo
    return <Component />
  }

It works. See https://codesandbox.io/s/j1nz8xwrn3
Ps. Please DON'T file duplicate issues.


Not working on Camunda Modeler 4.2.0

An user (Antonio_Junior) on Camunda Modeler Forum wrote that he is receiving this error message after copying the plugin.
[diagram_1.bpmn] Cannot read property ‘getFormsTab’ of undefined at GeneratedFormPreviewPluginProvider.getTabs (webpack:///client/GeneratedFormPreviewPluginProvider.js:22:0) at GeneratedFormPreviewPluginProvider.CallActivityExt.propertiesProvider.getTabs (webpack:///client/properties-provider/CallActivityExt.js:71:0) at getTabs (webpack:///node_modules/bpmn-js-properties-panel/lib/PropertiesPanel.js:446:41) at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:97811 at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/2.2.js:1:45005 at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:365:33) at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:350:23) at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:311:23) at fire (webpack:///node_modules/diagram-js/lib/core/Canvas.js:477:13) at setRootElement (webpack:///node_modules/bpmn-js/lib/import/BpmnImporter.js:112:17) at add (webpack:///node_modules/bpmn-js/lib/import/Importer.js:53:24) at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:29935 at rootElement (webpack:///node_modules/bpmn-js/lib/import/BpmnTreeWalker.js:215:24) at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:356935 at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:356958 at new Promise () at F (webpack:///node_modules/bpmn-js/lib/import/Importer.js:72:9) at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:362018 at new Promise () at A. (webpack:///node_modules/bpmn-js/lib/BaseViewer.js:286:9) at apply (webpack:///node_modules/bpmn-js/lib/util/CompatibilityUtil.js:50:17) at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:361502 at new Promise () at A. (webpack:///node_modules/bpmn-js/lib/BaseViewer.js:228:9) at apply (webpack:///node_modules/bpmn-js/lib/util/CompatibilityUtil.js:50:17) at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:360771 [ error ] This error may be the result of a plug-in compatibility issue. [ info ] Disable plug-ins (restarts the app) [ info ] [diagram_1.bpmn] Cannot read property ‘id’ of undefined at file:///D:/Camunda/Modeler%204.2/resources/plugins/camunda-modeler-plugin-multidiagram/client/client.js:514:93 at file:///D:/Camunda/Modeler%204.2/resources/plugins/camunda-modeler-plugin-multidiagram/client/client.js:28190:9 at forEach (webpack:///node_modules/min-dash/dist/index.esm.js:145:0) at find (webpack:///node_modules/min-dash/dist/index.esm.js:77:0) at DiagramUtil…/client/bpmn-js-extension/multi-diagram/utils/DiagramUtil.js.DiagramUtil.currentDiagram (webpack:///client/bpmn-js-extension/multi-diagram/utils/DiagramUtil.js:23:0) at file:///D:/Camunda/Modeler%204.2/resources/plugins/camunda-modeler-plugin-multidiagram/client/client.js:993:38 at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/2.2.js:1:45005 at listener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:365:33) at _invokeListener (webpack:///node_modules/diagram-js/lib/core/EventBus.js:350:23) at _invokeListeners (webpack:///node_modules/diagram-js/lib/core/EventBus.js:311:23) at fire (webpack:///node_modules/bpmn-js/lib/BaseViewer.js:662:30) at file:///D:/Camunda/Modeler%204.2/resources/app.asar/public/5.5.js:1:360981 [ error ] This error may be the result of a plug-in compatibility issue. [ info ] Disable plug-ins (restarts the app) [ info ]

There is an issue on Camunda UserTask Generated Form Preview plugin, which cannot work with multiple propertiesProvider.


Update example in README with optional text argument

Thanks!

(I won't make a new release for this only)


feat(atomic): rename sort-expression caption to label

https://coveord.atlassian.net/browse/KIT-811

One problem with this: This is breaking, and would most probably break hosted search page for trials, if merged and released today.
So: I'd like to get everyone opinion: Do the change and coordinate with the guys from hosted search page so that it does not break their stuff, or leave the option name as caption.
IMO, it's not that big a deal, but 🤷

What if we did similar to headless, supporting both options, with priority to the new one? Deprecate the old, and log warnings if it is being used. When the v1 release is done, remove support for the old option,

You can close this, I'll make that a change in the bump to v1 branch


Windows font

Hi yas-sim,
Thanks a lot for sharing great code!!!
FYI, for Windows,  fontName = 'msgothic.ttc' worked at my Win10 env., fontName = 'meiryo.ttc' did not work, though I could not reach the route cause.
Thanks,
BR/Kobu

Thank you Kobu-san.
I have switched the font for Win10 from meiryo.ttc to msgothic.ttc because the msgothic.ttc is more popular and common in Japanese Win10 environment. I believe it's safer than using meiryo.ttc.
Please pull the code again and confirm if the change is reflected and working.
Thanks

Hi yas-sim san,
git cloned the new code on Win10, worked. ;-)
Thanks a lot!!
BR/Kobu

issue resolved. closed.


Repo Checks: Users should not have direct repo access

Background: All repo access should go through teams, as it makes it saner for us to establish and manage an access stucture for the org. Most repo access goes through teams today, although some repos give direct access to people.
### Tasks
- [ ] Write a repo checks that flags & removes all users who are directly added to any given repo.
- [ ] Dry-run the check. Looks at the list of direct-user-repo access. Are some of those access grants appropriate?
- [ ] Where it's appropriate: Move the users into teams (creating teams as necessary) which grant the same access.
- [ ] Run the check again, this time with `--no-dry-run`, which should remove all remaining users with direct repo access.

Note: this could be based on the EnsureNoMaintainOrAdmin check, which Feanil recently added: https://github.com/openedx/repo-tools/blob/9434beab752ab0ea3f5c8e454f0eaeb75f617de7/edx_repo_tools/repo_checks/repo_checks.py#L160

@kdmccormick Thanks for creating the well-groomed story. I have the following question
"Should admin users be candidates to be removed as well?"

@farhan Yep, no user should be directy on a repo with any level of access.

I've run this check on the org and made all the necessary updates.


Code signing error even when enterprise certificate is in login.keychain

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I have read the Contribution Guidelines

Issue Description
Fastlane fails when I try to export an ipa using an enterprise certificate. The enterprise cert is correctly installed in the login.keychain. If I move the enterprise certificate into the System.keychain the ipa is exported correctly.
Related issue: #1066.
Complete output when running fastlane, including the stack trace and command used
fastlane release

Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching "iPhone Distribution: **********" were found.

Configuration Files
Please copy the complete content of your Fastfile and any other configuration files you use below:
Fastfile:
default_platform :ios

platform :ios do

  before_all do

  end

  desc "Executing release lane"
  lane :release do

    gym(
        scheme: ENV['XCODE_SCHEME'],
        project: ENV['PROJECT'],
        sdk: ENV['SDK'],
        codesigning_identity: ENV['CODE_SIGN'],
        use_legacy_build_api: true,
        output_directory: ENV['OUTPUT_DIRECTORY'],
        configuration: 'Release'
    )

  end

  after_all do |lane|

    notify "Fastlane succeeded '#{lane}'"

  end

  error do |lane, exception|

    notify "Fastlane failed '#{lane}'"

  end

end

Xcode:

Environment
fastlane version (run fastlane -v): fastlane 1.81.0

@TKBurner and @KrauseFx Using the command generated by gym
set -o pipefail && xcodebuild -scheme 'Scheme' -project 'PathToProject.xcodeproj' -configuration 'Release' -sdk 'iphoneos9.3' -destination 'generic/platform=iOS' -archivePath 'PathToArchive.xcarchive' archive CODE_SIGN_IDENTITY='iPhone Distribution: ******' | tee PathToLog.log | xcpretty

The archive and the app are generated correctly.
▸ Touching Scheme.app
▸ Signing PathToApp.app
▸ Touching Scheme.app.dSYM
▸ Archive Succeeded

Any suggestions?

Hi @flexaddicted! Great to hear from you. Can you share where you set your ENV codesigning_identity? What happens if you don't set it manually?

@TKBurner I tried also manually but it does not work. I tried to set up a mini project and it seems working in the correct. Since I'm using also React Native the problem could rely on that. But not sure. I will back to you with when I will set up React Native in that dummy project. Anyway, using xcodebuild directly it works.

Hi @flexaddicted Thanks for following up. Can you add the --verbose flag to your lane and share the full output? It could be react related, but if your project is able to build in Xcode Fastlane should handle it.

@TKBurner Sorry for the delay. I'll close the issue since I started a new branch from scratch and the problem is not there anymore. I can confirm there was something wrong with my build settings (but I did not investigate about it). I can also confirm that the gym configuration I am using is correct.

Thanks for letting us know @flexaddicted! Glad to hear you are back up and running 👍


OpenSearch integration

It's similar to the Elasticsearch integration, though some metrics are a bit different. I've changed the namespace and tag names, but we reuse the same version checks.
I've tested the integration with OpenSearch 2.0.1, but I'm expecting 1.x to work as well, hence the 1.x constraint to versions. A lot of YAML files and chunks of files that you can still find in the Elasticsearch integration were removed as well, in an effort to clean up and only support recent versions (OpenSearch is by definition recent).

@PabloB94 or @yagogou: can one of you guys take a look and see if you spot anything weird before I merge this?

I'm merging this because I've tested it N times and it looks OK.

Yes, adapted from ES.

P.S. Thanks for looking!


TemplateURL seems ignored on Test environment

Hi,
Is the TemplateURL property is available on Test environment?
I am sending a payin request to https://api.sandbox.mangopay.com/v2.01/.../payins/card/web/ on Homologation, but the TemplateURL is always https://api.sandbox.mangopay.com/...
Example of response :
{
  "PaymentType" : "CARD",
  "Id" : "76500926",
  "CreationDate" :<PHONE_NUMBER>000,
  "AuthorId" : "...",
  "CreditedWalletId" : "...",
  "CreditedUserId" : "...",
  "DebitedFunds" : {
    "Currency" : "EUR",
    "Amount" : 20.0
  },
  "Fees" : {
    "Currency" : "EUR",
    "Amount" : 0.0
  },
  "CreditedFunds" : {
    "Currency" : "EUR",
    "Amount" : 20.0
  },
  "Nature" : "REGULAR",
  "Status" : "CREATED",
  "Type" : "PAYIN",
  "ExecutionType" : "WEB",
  "ReturnURL" : "http://test.net/test?transactionId=76500926",
  "CardType" : "CB_VISA_MASTERCARD",
  "SecureMode" : "DEFAULT",
  "Culture" : "FR",
  "TemplateURL" : "https://api.sandbox.mangopay.com/Content/PaylineTemplate?rp=...&transactionId=76500926",
  "StatementDescriptor" : "cart1",
  "RedirectURL" : "https://homologation-secure-p.payline.com/webpayment/step2.do?reqCode=prepareStep2&token=..."
}

Hello @oryam
For the Web PayIn you have two options.

Option 1 : TemplateURLOptions parameters =  null

The TemplateURL in the JSON response will refer to the link of the payment page (always the same https://api.sandbox.mangopay.com/ links)

Option 2 : TemplateURLOption parameters =  A URL to an SSL page to allow you to customise the payment page.  TemplateURLOptions ": { "PAYLINEV2": "your links" },

The TemplateURL in the JSON response will be the link to the payment page (your custom payment page )

You can find more info here : https://docs.mangopay.com/endpoints/v2.01/payins#e269_create-a-card-web-payin.
Have a nice day,

Thanks for your answer.
We noticed another reason that was blocking the display of the custom page. It is that we have compressed page (gzip). So after realizing this issue, we did some updates.
Now, it is working with an old template rendering when giving { "Payline": "custom link links" }
Not working, when trying with { "Paylinev2": "custom link links" } . TemplateURL and RedirectURL are retruned with the same value ( given value set in TemplateURLOptions).

So, I tried for TemplateURLOption with { "Payline": "custom link links" } (Paylinev2 is not working, or I got the default v2 page, if I do not set TemplateURLOption )
Then I am getting a correct TemplateURL value such as "TemplateURL" : "https://mysite.../payment.html?orderRef=XXXXX&orderAmount=30.0&orderCurrency=EUR&step=2&transactionId=76616886",
(I hard coded the parameters orderRef=XXXXX&orderAmount=30.0&orderCurrency=EUR&step=2)
The payment page is using correctly my custom CSS styles, but there is not amount, neither currency in the page.

Hello @Riwak Riwak , It seems my template URL is ignored as well.
This is how I set the option:
	PayInTemplateURLOptions templateOptions = new PayInTemplateURLOptions();
	templateOptions.PAYLINEV2 = templateURL;
	exec.setTemplateURLOptions(templateOptions);
	payIn.setExecutionDetails(exec);

But in the response from mangopay I always get the default page and  template options are null:

Is there any way to check if my template is fine? Our URL match all requirements mentioned here:
https://docs.mangopay.com/guide/customising-the-design
I can privately message you our payline URL if that is any help.

Good afternoon everyone !
This new PAYLINEV2 parameter management highlight an old bug on serialization.
#183 will fix it, by deleting wrongly set ExecutionDetails property on JSON call, which made TemplateURLOptions object not well understood by our API (bug only visible for Payin Web)
A fix will be deployed this afternoon 🙏

Release 2.10.1 is now available on maven @felixhagspiel.


Consider using performance.now() to improve time API precision

Currently Date.now() is used, which has very limited precision.
AFAIK, performance.timing.navigationStart can be added to performance.now() to get the absolute time reference.

That’s a good point! Happy to accept a PR if you would like to contribute!

The newest release should be using performance.now.
Closing the issue!