Application Freezes When there are too many items in Listbox

Describe your issue
After scrolling a lot the application freezes. Error: not enough memory resources to process this command.
      <ListBox  VerticalAlignment="Top" ScrollViewer.CanContentScroll="True"
VirtualizingPanel.IsVirtualizing="true"
VirtualizingPanel.VirtualizationMode="Recycling"  Grid.Row="1" Grid.Column="1"  SelectionChanged="MoviesDisplay_OnSelectionChanged" ScrollViewer.ScrollChanged="MoviesDisplay_OnScrollChanged"  ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible" Background="Transparent" x:Name="MoviesDisplay">

          <ItemsControl.Resources>
              <Style x:Key="ScaleStyle" TargetType="Image">
                  <Style.Triggers>
                      <Trigger Property="IsMouseOver" Value="True">
                          <Setter Property="Grid.ZIndex" Value="1"/>
                          <Setter Property="RenderTransform">
                              <Setter.Value>
                                  <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                              </Setter.Value>
                          </Setter>
                      </Trigger>
                  </Style.Triggers>
              </Style>
          </ItemsControl.Resources>
          <ListBox.ItemContainerStyle>
              <Style TargetType="ListBoxItem">
                  <Setter Property="IsSelected" Value="{Binding Content.IsSelected, Mode=TwoWay, RelativeSource={RelativeSource Self}}"/>
                  <Setter Property="Template">
                      <Setter.Value>
                          <ControlTemplate TargetType="ListBoxItem">
                              <ContentPresenter/>
                          </ControlTemplate>
                      </Setter.Value>
                  </Setter>
              </Style>
          </ListBox.ItemContainerStyle>
          <ListBox.ItemTemplate>
              <DataTemplate>
                  <StackPanel  Cursor="Hand" Margin="0 20 20 0" Orientation="Vertical">
                      <Image  VerticalAlignment="Top" Height="375" Width="250" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" RenderTransformOrigin="0.5,0.5" Style="{StaticResource ScaleStyle}"  Source="{Binding Bitmap}"></Image>

                      <TextBlock VerticalAlignment="Top" Margin="0 20 0 0" FontSize="18" MaxWidth="200" HorizontalAlignment="Left" Grid.Row="1"  TextWrapping="Wrap" Text="{Binding Name}" Foreground="White"></TextBlock>

                      <StackPanel Margin="-5 1 0 0" Orientation="Horizontal">

                          <materialDesign:RatingBar  HorizontalAlignment="Left"
                                                     x:Name="ReadOnlyRatingBar"
                                                     IsReadOnly="True"
                                                     Value="{Binding Rating}"></materialDesign:RatingBar>

                          <TextBlock FontSize="15" Margin="15 3.5 0 0" Grid.Column="1" HorizontalAlignment="Left" Text="{Binding RatingNumber}" Foreground="#767676"></TextBlock>
                      </StackPanel>
                  </StackPanel>
              </DataTemplate>
          </ListBox.ItemTemplate>
          <ListBox.ItemsPanel>
              <ItemsPanelTemplate>
                  <controls:VirtualizingWrapPanel VirtualizingStackPanel.IsVirtualizing="True"  VirtualizingStackPanel.VirtualizationMode="Recycling" IsItemsHost="True" Orientation="Horizontal"  />
              </ItemsPanelTemplate>
          </ListBox.ItemsPanel>
      </ListBox>

private async void MoviesDisplay_OnScrollChanged(object sender, ScrollChangedEventArgs e)
{
    if (e.VerticalOffset == e.ExtentHeight - e.ViewportHeight)
    {
            await GetMorePageForPopularMovies("en");
    }
}

I use this https://github.com/jellyfin/TMDbLib
  private ObservableCollection<Movie> newMovieList = new ObservableCollection<Movie>();

 private async Task GetMorePageForPopularMovies(string language)
 {
     var popularList = await Service.client.GetMoviePopularListAsync(language, page);

         foreach (var popularMovie in popularList.Results)
         {
             if (!String.IsNullOrWhiteSpace(popularMovie.PosterPath))
             {
                 Movie mov = new Movie()
                 {
                     Name = popularMovie.Title,
                     Id = popularMovie.Id,
                     Rating = popularMovie.VoteAverage,
                     ShowType = ShowType.Movie
                 };

                 var url = Service.client.GetImageUrl("w500", popularMovie.PosterPath);
                 mov.Bitmap = Service.GetImage(url.AbsoluteUri, ImageType.Poster);
                 if (newMovieList.Any(x => x.Id == popularMovie.Id))
                 {
                 }
                 else
                 {
                     newMovieList.Add(mov);
                 }

         }
     }
     page++;
 }

Version Info
Package Version 2.0.12
.NET Version: NET 8.0
OS Version: Windows 10 22H2 Build 19045.5011

The problem I see here is that you load a bitmap for each movie you load, but you never free the bitmaps. The VirtualizingWrapPanel only virtualizes the UI elements. The data you are loading has to be freed by your code when it is no longer needed.

The problem I see here is that you load a bitmap for each movie you load, but you never free the bitmaps. The VirtualizingWrapPanel only virtualizes the UI elements. The data you are loading has to be freed by your code when it is no longer needed.

How can I do that?

Basically, you need to make sure that you dispose the bitmaps that are no longer needed/visible (data virtualization). You can do this, for example, in the ScrollChanged event on a per-page basis, such as in your loading code, or in the DataContextChanged event of the individual elements. Alternatively, you could use some sort of bitmap "pool" with an appropriate maximum size.

I have the same issue on my end, but for me it's caused by using a SharedSizeGroup on a Grid inside of the item template. This works fine most of the time, but when there are several hundred items in the ListBox it causes the app to freeze and I can see in the Visual Studio debugger how the app memory keeps increasing until it runs out of memory. I should also note that this does not happen when using a normal non-virtualized WrapPanel as the panel of the ListBox.
I do realize that a SharedSizeGroup can be expensive, and the reason I use it is to ensure the height of the items is the same. Is there another approach I can take instead? If I don't do this then the items height appears to be determined by the first item in the list. This causes the bigger items to be clipped so they don't fully display. I know I can set AllowDifferentSizedItems to true, but then the items end of having different heights, while what I want is to have each item have the same height as the biggest item. Is there another solution to this?

@RayCarrot I don't know how SharedSizeGroup is implemented, but I can't imagine it's such a big problem. Have you analyzed your memory usage? If you are sure that SharedSizeGroup is the cause of the freeze, please open a new issue with steps to reproduce or an sample project.
Another approach would be to keep track of the max item height yourself (e.g. using the loaded or size changed event of the root element of your item template) and set the ItemSize property of the VirtualizingWrapPanel accordingly.


[libpq] build failure on arm64-osx

Operating system
Mac (ARM64)
Compiler
Clang 15.0.0
Steps to reproduce the behavior
`vcpkg.json`:

{
    "name": "example",
    "version-semver": "0.0.0",
    "dependencies": [
      {
        "name": "vtk",
        "version>=": "9.3.0-pv5.12.0#3",
        "features": ["mpi", "qt"]
      }
    ],
    "default-features": [],
    "features": {
      "test": {
        "description": "Dependencies for testing",
        "dependencies": [
          {
            "name": "catch2",
            "version>=": "3.5.3"
          }
        ]
      }
    },
    "builtin-baseline": "576379156e82da642f8d1834220876759f13534d"
  }

Failure logs
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /usr/bin/make V=1 -j 17 -f Makefile all
    Working Directory: /opt/vcpkg/buildtrees/libpq/arm64-osx-dbg/
    See logs for more information:
      /opt/vcpkg/buildtrees/libpq/build-arm64-osx-dbg-out.log
      /opt/vcpkg/buildtrees/libpq/build-arm64-osx-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_make.cmake:136 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_make.cmake:2 (vcpkg_build_make)
  buildtrees/versioning_/versions/libpq/aac67118e4bd1ee29001f206697fb8461e47a590/portfile.cmake:140 (vcpkg_install_make)
  scripts/ports.cmake:192 (include)

 ~  cat /opt/vcpkg/buildtrees/libpq/build-arm64-osx-dbg-err.log                         ok | at 16:25:28
In file included from hashfn.c:24:
In file included from ../../src/include/postgres.h:46:
../../src/include/utils/elog.h:79:10: fatal error: 'utils/errcodes.h' file not found
#include "utils/errcodes.h"
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [hashfn.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [all] Error 2

Additional context
Issue is with libpq. This only happens when installing with vtk[qt]. Looks like it installs an incompatible version of postgresql
Apple clang version 15.0.0 (clang-15<IP_ADDRESS>)
Target: arm64-apple-darwin23.5.0

Sorry I didn't repro your issue. Maybe you can see:
https://github.com/microsoft/vcpkg/issues/31143#issuecomment-1526871518

Did you try installing it through the vtk port rather than just libpq itself? I reproduced it on a clean vcpkg before creating the issue.

I also couldn't repo with your vcpkg.json

So you both were able to install postgresql 16.2 and get past this step?
Installing 12/71<EMAIL_ADDRESS>Building<EMAIL_ADDRESS>/opt/vcpkg/buildtrees/versioning_/versions/libpq/aac67118e4bd1ee29001f206697fb8461e47a590: info: installing overlay port from here
-- Downloading https://ftp.postgresql.org/pub/source/v16.2/postgresql-16.2.tar.bz2 -> postgresql-16.2.tar.bz2...
-- Extracting source /opt/vcpkg/downloads/postgresql-16.2.tar.bz2
-- Applying patch unix/installdirs.patch
-- Applying patch unix/fix-configure.patch
-- Applying patch unix/single-linkage.patch
-- Applying patch unix/no-server-tools.patch
-- Applying patch unix/mingw-install.patch
-- Applying patch unix/python.patch
-- Applying patch windows/macro-def.patch
-- Applying patch windows/win_bison_flex.patch
-- Applying patch windows/msbuild.patch
-- Applying patch windows/spin_delay.patch
-- Applying patch android/unversioned_so.patch
-- Using source at /opt/vcpkg/buildtrees/libpq/src/tgresql-16-b00fbb6ff2.clean
-- Found external ninja('1.11.1').
-- Getting CMake variables for arm64-osx
-- Getting CMake variables for arm64-osx-dbg
-- Getting CMake variables for arm64-osx-rel
-- Generating configure for arm64-osx
-- Finished generating configure for arm64-osx
-- Configuring arm64-osx-dbg
-- Configuring arm64-osx-rel
-- Building arm64-osx-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /usr/bin/make V=1 -j 17 -f Makefile all
    Working Directory: /opt/vcpkg/buildtrees/libpq/arm64-osx-dbg/
    See logs for more information:
      /opt/vcpkg/buildtrees/libpq/build-arm64-osx-dbg-out.log
      /opt/vcpkg/buildtrees/libpq/build-arm64-osx-dbg-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_make.cmake:136 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_make.cmake:2 (vcpkg_build_make)
  buildtrees/versioning_/versions/libpq/aac67118e4bd1ee29001f206697fb8461e47a590/portfile.cmake:140 (vcpkg_install_make)
  scripts/ports.cmake:192 (include)

Yes I used your vcpkg.json and run vcpkg install and everything worked fine.

I cleaned my cache, var folders, removed and cloned vcpkg again. No idea why it's not working then...

Maybe you have set your MAKELEVEL: https://stackoverflow.com/questions/68379786/building-postgres-from-source-throws-utils-errcodes-h-file-not-found-when-ca

Legend. Thank you so much!
I have a makefile with:
depends:
	vcpkg integrate install
	vcpkg install

build_debug:
	cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug
	cmake --build build -j 16 --config Debug
	cmake --install build

If I run make build_debug then it fails. If I run vcpkg install then it worked.


In-memory synthetic SolrCore for QA node

Description
A prototype to attempt using an in-memory SyntheticSolrCore  similar to the SolrCoreProxy in our Solr 8.8
The synthetic collection/replica introduced in Solr 9 added the collection folder to physically disk and also the zookeeper solr/collections.
However, it seems that what we essentially need is a SolrCore in the memory for each config set, which might be able to simply register it against the CoreContainer without actually writing to disk and ZK.
Solution
Introduced SyntheticSolrCore which extends SolrCore, SyntheticSolrCore is only used in Coordinator node to support a subset of SolrCore functionalities required by Coordinator operations such as aggregating and writing out response and providing configset info.
Such core is only registered to the CoreContainer but is no longer written to disk nor zookeeper.
Tests

TestCoordinatorRole passed, which provides good integration test coverage to ensure SyntheticSolrCore is working as expected
Local and playpen testing:
i.  Basic query and restart tests from QA node
ii. Shard split and moves and ensure QA node can distribute the requests to new shards

@chatman @noblepaul . I would ❤ to gather some thoughts from you both! Mostly on the idea, as for the implementation details, we might need to further cleanup the logic if we decide to move forward.
The synthetic collection was created to avoid excess proxy cores created in 8.x AFAIK, I'm wondering if this proposal could address such concern without raising new ones?

The biggest challenge is pushing this upstream. Making changes to SolrCore and introducing a concept of synthetic for a one of the core classes, for a niche feature is hardsell. However if this is to be only kept in-house , this should be fine

The biggest challenge is pushing this upstream. Making changes to SolrCore and introducing a concept of synthetic for a one of the core classes, for a niche feature is hardsell. However if this is to be only kept in-house , this should be fine

That's a good point, totally agree! Even if we do not upstream this, minimizing changes to SolrCore could save us from merge issues.
I have add some minor changes and javadoc to my implementation. The only change to SolrCore would be the access modifier of bufferUpdatesIfConstructing. I'm hoping that the apache community will find it not as invasive (and it was protected in 8.8).

I like the fact that the changes to SolrCore is tricial/non-invasive. We can push this upstream as well
👍

@hiteshk25
Good call on please make sure QA logs are ok (collname, etc) . The existing proposal did miss the collection name!
I have committed some fixes:

Collection name should be set properly for the collection being queried on now.
The SyntheticSolrCore should now be one instance per configset, my previous code didn't check correctly

Would you mind to review the changes in https://github.com/cowpaths/fullstory-solr/pull/181/commits/a32a2acb6a1524a061e40f3c2de53a4e6049e0ee . Many thanks again!!!


CLI for training and classifying without expertise

The web demo seems to have a similar function already, but I'd like a command-line interface to train and classify people like in the web demo.
This would allow easy integration into other apps, and inevitably lead more people to use this system.
Example interface:
openface_train img.png Name
openface_train *.png Name
openface_classify img.png [output: Name 0.63]
Thanks for the work, and the choice of a good license.

Hi @tom-adsfund - thanks for the report. Demo 3 provides demos/classifier.py to train an SVM from a directory of images. The model is exported and the infer mode predicts the person in a new image.
I'll add a few more details to the README about using the train mode of this to build a new classifier:

Align a directory of images organized in subdirectories by their names with util/align-dlib
Extract the features from aligned images with batch-represent
Train a classifier on the features with demos/classifier.py train, which outputs a model
Give the model to demos/classifier.py infer to predict who a new image belongs to.

Hey @bamos, I tried to do this and have now a directory structure with the aligned photos.
Now I have another question regarding point 2. How do I run batch-represent?
Using luajit or th? I get no output when I run it:
luajit batch-represent/batch-represent.lua

I tried also -help and --help. Thanks again!

Hi @kaikuehne

[ ] Thanks, I'll clarify how batch-represent works in the docs.

The default OSX versions of many command-line tools are incompatible with the GNU variants that most Linux distros use. The prefixed g stands for the GNU variants in OSX, which can be installed with findutils (for gfind) and coreutils (for gwc) from brew or macports. Most people keep the prefix g because some command-line and system program for OSX might depend on the non-GNU version of the utilities.

[ ] Will also add this to the docs.

-Brandon.

Thanks!

@bamos If there's a concrete example of the whole process as described here then that would be sufficient to resolve this issue. Thanks again.

Hi @tom-adsfund,
I took a few notes while installing and using the classifier.
Maybe they are of use in the meantime: https://gist.github.com/kaikuehne/d027a0ff3aa353a7322a

@kaikuehne Wow that's excellent. I use Linux, but it should be easy enough to transfer. Thanks.

I've added references to findutils and coreutils to the docs for native OSX execution and have clarified the instructions for training. Happy to merge in or reference any further suggestions if the docs aren't clear anywhere.
-Brandon.


Define ValidatorRepository interface

blocked by https://github.com/thenewboston-developers/Kotlin-SDK/issues/8

I'll take this one.

@IanArb Could you close this issue?

Hi @MrIceman, please share your account number so that we know where to send your coins. Every accepted PR gets paid. If you do not yet have an account then please download the account manager here https://thenewboston.com/download and follow these steps https://thenewboston.com/account-manager/create-an-account to create an account.”
After they give you their account number, add their account information to the contributors.csv file
Their github_avatar_url can be found by visiting https://api.github.com/users/buckyroberts (replace buckyroberts with their username) and finding the avatar_url


use large heap block for all page heap allocation

@curtisman @digitalinfinity

Don't you want to merge this in to release/1.2?

see #711


Open-source party with the Israel OS community

Event Name
Open-source party with the Israel OS community
Event Date
05/29
Start time in UTC
17:00
End time in UTC
20:00
Event Type
meetup
Organizer name
Uriel Ofir
Event URL
https://discord.gg/9w6ZWuPe
Event Description
Open-source parties are part of our OS community tradition.
Everyone comes up and introduces themselves in the context of open-source.
Working together to figure out how each one can proceed and how to make connections with each participant.
Participants
No response
Maintainers
No response

Hi @UrielOfir do you have an expected number of participants attending? And maintainers attending? Estimates are fine.

I can estimate that from Israel we'll have 20 participants and 5 of them will be maintainers.

Thanks @UrielOfir - this is live on the site! https://maintainermonth.github.com/schedule/osparty_israel

Hi, can we do updates?
I changed the text a bit-
It's online meeting on our Discrod server where everyone comes up and introduces themselves in the context of open-source.
(for the second sentence).
and change the link to this- https://www.meetup.com/maakaf/events/

@abbycabs Can you update the event?


No output defined for shell (bash/zsh/fish) completion files

Issue description
I want to add several completion files for several packages, and don't know in which output should i place completion files. The best one seems doc output, or should i introduce new output for shell completion files?
@edolstra @vcunat @dezgeg

I would introduce completion output that would have autocompletions. We also have man output, so this does seem similar the way how we currently do things.

So far we've put it in bin. I don't think there's much need to have a separate output for that since the completion files are quite small, I think.

Cool, so let's have bin output if it's used by derivation, out otherwise. I will open a new issue for documenting this.

I recommend ${!outputBin}.


Listen on wildcard address on master

In case of complex network configuration for Tachyon cluster, like when working in AWS with Elastic IP attached to Tachyon master machine, external IP or DNS may not be related to addresses attached to the instance. Moreover, in such case external IP is undiscoverable at the instance itself. Same happen when working behind NATs or load balancers.

Can one of the admins verify this patch?

@navado Thanks for the patch! Would it be possible to create a configuration option for this setting, since I do not think listening on all interfaces is ideal?

Well, sure no problem. I'm not too confident with the configuration ideology of Tachyon. Something like tachyon.master.bind=HOST|IP would be OK?
Then wildcard configuration would look like -Dtachyon.master.bind=<IP_ADDRESS>
What do you think?

Would we ever want to set the value to anything other than the hostname or wildcard ip? If its only a question between the two, perhaps a boolean flag would be a better choice to avoid confusion (since in normal setups this would just be a duplicate of master hostname?

In general case you can have a system with many network interfaces attached or many addresses to the same interface and the administrator may want bind Tachyon to one (or in general to any subset) of them.
However as administrator i don't want deal with additional configuration of arbitrary system on the server. Native behavior is to bind to wild-card address (and have consistent behavior of parts of the service.For example web interface binds to wild-card).
Actually I don't really understand the idea behind listening to specific address in this case. What's wrong with wild-card?

Let's also discuss implication of changing default "localhost" to "<IP_ADDRESS>"

Like you say it is possible to have complex network configurations where physical nodes may have multiple host names and/or IP addresses which represent distinct networks with different performance characteristics.
For a real world example in the systems I work on each compute node has multiple distinct physical network interfaces with distinct host names (and thus IPs) assigned to them.  Therefore the choice of host name/IP affects which physical network interface gets used to communicate and thus the performance of Tachyon (or any other distributed system for that matter).  Note that  I'm not talking about different Ethernet networks here I'm talking about different network interface representing different physical interconnect technologies - in our case we have an Ethernet network and the Cray Aries network
So using the correct host name is essential to get the best performance out of our systems because we want to force applications to use the fast interconnect.  In that scenario we don't want to allow applications to connect over the slower interconnect because it will noticeably degrade performance so we do not want to listen on a wildcard address.

@navado The current configuration allows you to handle the case of binding Tachyon to one of the network interfaces right? If the configuration was added in the way you proposed, would it be able to bind to any subset of the interfaces?
Also, could you please open a JIRA ticket for this issue and add it to the title? Thank you!
@rvesse Thanks for the use case!

Jenkins, test this please.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Tachyon-Pull-Request-Builder/2957/
Test PASSed.

@rvesse You right. However sometimes given hostname (or IP address, btw) is not resolvable on the master host, but should be used in the rest of the cluster and for client connections. So for master host you need to use one setting but propagate another for the cluster.
Therefor I think it's better to configure bind IP instead boolean setting with the assumption that if not provided MASTER_HOSTNAME used.

@navado An optional bind IP setting defaulting to master hostname sounds good.

@calvinjia @navado Yes I think it would be nice to support all three options:

Listen on MASTER_HOSTNAME (current behaviour)
Listen on specific IP
Listen on wildcard IP

We can’t automatically merge this pull request.

Can one of the admins verify this patch?


python3Packages.aw-qt: build requires setuptools

Without setuptools provided the build will fail on both x86_64-linux and aarch64-linux, on both master and nixos-24.11:

https://hydra.nixos.org/build/282314614 (aarch64, nixos-24.11)
https://hydra.nixos.org/build/282313984 (x86_64, nixos-24.11)
https://hydra.nixos.org/build/282184814 (aarch64, master)
https://hydra.nixos.org/build/282203344 (x86_64, master)

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Duplicate of https://github.com/NixOS/nixpkgs/pull/366195


Button capture reset after changing any setting

I want to use a button in the Main content of a page.
Adding and renaming the button capture, check.
But when I go into the settings menu and change any attribute, the capture changes back to the initial value ("Button" or "Enter text ...").
When you enter the URL value, start typing already resets the capture.
Other values (like color, URL, ...) persist.

This is the distribution repository. Please read the readme or documentation regarding opening issues.


Arguments given to minizinc are not take into account

This is probably a problem of minizinc's python API, but maybe some more digging should be done (or a warning should be given to the user until the issue is fixed).
When solving an instance with minizinc, we can give some arguments to the solve() function (https://minizinc-python.readthedocs.io/en/latest/api.html#minizinc.instance.Instance.solve).
However, the arguments are not taken into account. E.g. using intermediate_solutions=True in an optimization problem does not output the rest of the solutions found as intended, but only the last one.

Not existing anymore


Adjust flags to ensure tunnel producer is cleaned up

The issue describes most of the issue.  This error came in with PR #7237.  We were internally running the first version of that PR, but in reviewing the PR @masaori335 found a ink_assert being triggered.  I over fixed the change, so when we upgraded our build to run the final version of the PR, we started seeing many crashes due to lingering continuations being associated with VC vio's.
This PR fixed the issue by not proactivity marking the producer dead.   So the normal cleanup paths will still be executed.
This closes #7338

[Nov 25 09:47:45.783] [ET_NET 0] DEBUG: <HttpTunnel.cc:1307 (consumer_handler)> (http_tunnel) [0] consumer_handler [http server post VC_EVENT_WRITE_COMPLETE/TS_EVENT_VCONN_WRITE_COMPLETE]
[Nov 25 09:47:45.783] [ET_NET 0] DEBUG: <HttpSM.cc:3625 (tunnel_handler_post_server)> (http) [0] [&HttpSM::tunnel_handler_post_server, VC_EVENT_WRITE_COMPLETE/TS_EVENT_VCONN_WRITE_COMPLETE]
[Nov 25 09:47:45.783] [ET_NET 0] DEBUG: <HttpSM.cc:2639 (main_handler)> (http) [0] [HttpSM::main_handler, HTTP_TUNNEL_EVENT_DONE]
[Nov 25 09:47:45.783] [ET_NET 0] DEBUG: <HttpSM.cc:2740 (tunnel_handler_post)> (http) [0] [&HttpSM::tunnel_handler_post, HTTP_TUNNEL_EVENT_DONE]
Fatal: HttpTunnel.cc:473: failed assertion `producer.alive == false`
traffic_server: received signal 6 (Abort trap: 6)
traffic_server - STACK TRACE:
0   traffic_server                      0x000000010fbe5c28 _Z19crash_logger_invokeiP9__siginfoPv + 136
1   libsystem_platform.dylib            0x00007fff6e4375fd _sigtramp + 29
2   ???                                 0x0000000000000000 0x0 + 0
3   libsystem_c.dylib                   0x00007fff6e30d808 abort + 120
4   libtscore.10.dylib                  0x0000000110a6e04e _Z9ink_abortPKcz + 350
5   libtscore.10.dylib                  0x0000000110a6b16c _ink_assert + 44
6   traffic_server                      0x000000010fd2c728 _ZN10HttpTunnel5resetEv + 216
7   traffic_server                      0x000000010fcc9dad _ZN6HttpSM26tunnel_handler_post_or_putEP18HttpTunnelProducer + 797
8   traffic_server                      0x000000010fcb738f _ZN6HttpSM19tunnel_handler_postEiPv + 1135
9   traffic_server                      0x000000010fcb221a _ZN6HttpSM12main_handlerEiPv + 1034
10  traffic_server                      0x000000010fbe909f _ZN12Continuation11handleEventEiPv + 255
11  traffic_server                      0x000000010fd2c60f _ZN10HttpTunnel12main_handlerEiPv + 463
12  traffic_server                      0x000000010fbe909f _ZN12Continuation11handleEventEiPv + 255
13  traffic_server                      0x000000010ffae3b5 _ZL23write_signal_and_updateiP18UnixNetVConnection + 165
14  traffic_server                      0x000000010ffae6ad _ZL17write_signal_doneiP10NetHandlerP18UnixNetVConnection + 45
15  traffic_server                      0x000000010ffadd75 _Z15write_to_net_ioP10NetHandlerP18UnixNetVConnectionP7EThread + 3205
16  traffic_server                      0x000000010ffad0e3 _Z12write_to_netP10NetHandlerP18UnixNetVConnectionP7EThread + 131
17  traffic_server                      0x000000010ffb1875 _ZN18UnixNetVConnection12net_write_ioEP10NetHandlerP7EThread + 37
18  traffic_server                      0x000000010ffa09ba _ZN10NetHandler18process_ready_listEv + 394
19  traffic_server                      0x000000010ffa1326 _ZN10NetHandler15waitForActivityEx + 2166
20  traffic_server                      0x000000010ffe2771 _ZN7EThread15execute_regularEv + 1025
21  traffic_server                      0x000000010ffe2bed _ZN7EThread7executeEv + 285
22  traffic_server                      0x000000010ffe0dab _ZL21spawn_thread_internalPv + 107
23  libsystem_pthread.dylib             0x00007fff6e443109 _pthread_start + 148
24  libsystem_pthread.dylib             0x00007fff6e43eb8b thread_start + 15
zsh: abort      /opt/ats-review/bin/traffic_server -T http

The assert which we faced at #7237 is back.

Just comment about the design of HttpTunnel, relying on these flags (active, call_sm, alive, ...) seems pretty fragile.

Are you seeing this assert from running autest?

Are you seeing this assert from running autest? Does seem like it would be encountered pretty easily, but didn't run into that one. Will set that up again.

Not AuTest. I saw this with h2spec + patch on the #7237.

Was able to reproduce the assert as well.  I have a possible couple fixes.  Will have to wait until tomorrow to try in our production environment.

Pushed up another commit.  This should avoid the debug assert, and has run without incident for a couple hours in production.  Will continue to keep an eye on that build today.

[approve ci autest]

Cherry-picked to v9.0.x branch.


another bug compilation (1.21)

https://youtu.be/HdKJWo9ab7s
01:16:25 - silverfish softlock
01:25:00 - ran out of beds
01:27:20 - died to a crystal
Developer Notes (leave this blank)
Difficulty: __
Estimated Time Required: __
Once development starts.

Thank you for the report


Drop frames without corresponding read requests

Don't clog up buffers with unwanted frames.

Perfect, thanks!


(fixup) s/swam/swap/

Oops!
@malnick -- Let me know if you'd like a test to validate these names as well, or if codifying them here is enough.

:ship:


ISPN-5725 Upgrade infinispan 7.2.x to hibernate-search 5.4.0.Final and hibernate-hql-parser 1.2.2.Final

hibernate-search 5.4.0.Final is not released yet, so this dependency is still SNAPSHOT

There are quite a lot of failures, still working on this.

Closing this for now as it requires a lot more work.


(535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials gj6sm7456452pjb.10 - gsmtp')

i am middle of the project and i was connecting django with gmail and i got this type of error.....
settings.py code for :
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = os.environ.get('EMAIL_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASS')
EMAIL_PORT = 587
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = EMAIL_HOST_USER
what should is in this !!!?
AND AS I AM PUTTING ANOTHER GMAIL ID IT SHOW THAT MAIL IS SENT BUT I CAN'T SEE THAT MAIL ANYWHERE???????????????????

Enable less secure app login for your google account, by default google doesn't allow you to login to smtp server.
Go here >>https://myaccount.google.com/lesssecureapps
and enable it and you will be good to go.

Thanks man

Show This Error:
(535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials m1sm1619710pjo.10 - gsmtp')
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_USE_TLS = True
EMAIL_PORT = 587
EMAIL_HOST_USER = '(Here I Give My Email)'
EMAIL_HOST_PASSWORD = '(Here I Give My Email Password)'
every thing is complete but email not send....!!!

@edward795
I alredy enable less secure app.
suggest me plz...

@edward795
I have the same problem even after enabling a less secure app.

@dipakbera
Hello, would you mind sharing what solved your issue in the end? In our case we also enabled less secure app but the same error shows up. Thanks!

Can you show your error? Sent from Mail for Windows 10 From: Trevor Y. H. HoSent: 08 June 2021 18:10To: CoreyMSchafer/code_snippetsCc: dipakbera; MentionSubject: Re: [CoreyMSchafer/code_snippets] (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials gj6sm7456452pjb.10 - gsmtp'<EMAIL_ADDRESS>would you mind sharing what solved your issue in the end? In our case we also enabled less secure app but the same error shows up. Thanks!—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

Thanks for getting back to me @dipakbera .
We solved the problem eventually by using a Google generated App Password. It looks like using the login pw was the problem for us before.
https://support.google.com/accounts/answer/185833?hl=en
2FA is still needed to generate this App pw but miraculously it solved the problem.
Thank you again!

From which platform, you are connecting me.Is it github or any else?welcome
you by the way.
On Wed, Jun 9, 2021, 4:01 PM Trevor Y. H. Ho @.***>
wrote:

Thanks for getting back to me @dipakbera https://github.com/dipakbera .
We solved the problem eventually by using a Google generated App Password.
It looks like using the login pw was the problem for us before.
https://support.google.com/accounts/answer/185833?hl=en
2FA is still needed to generate this App pw but miraculously it solved the
problem.
Thank you again!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-857581432,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQIITIKSWPKL4PAB5R5HCB3TR47HLANCNFSM4RTP26EQ
.

enabled -->> https://myaccount.google.com/lesssecureapps?pli=1&rapt=AEjHL4PW2mLzZHEaBJdC-4BjetXh3_23e0ttNOgSZxeff6S-MSTASUy81S5y7wRBe3BkCCj0hR0CKSmKHR9YCmFbDdpiaEkiOQ

Hello guys,
Here's how we are able to solve this problem:
Django SMPT Error answer:
https://support.google.com/mail/answer/7126229?p=BadCredentials&visit_id=637758197720369506-3330444657&rd=2#cantsignin&zippy=%2Ci-cant-sign-in-to-my-email-client
Steps:
1. Create 2-Step Authentication
https://support.google.com/accounts/answer/185839
2. Create App Password
https://support.google.com/accounts/answer/185833
3. Use the APP password as your EMAIL_HOST_PASSWORD in your settings file
It should work after that :+1:

how to show this using the alert box in GUI tkinter?

how to show this using the alert box in GUI tkinter?
Hello!! What wnat you to show using alert box

Hello guys,
Here's how we are able to solve this problem:
Django SMPT Error answer:
https://support.google.com/mail/answer/7126229?p=BadCredentials&visit_id=637758197720369506-3330444657&rd=2#cantsignin&zippy=%2Ci-cant-sign-in-to-my-email-client
Steps:
1. Create 2-Step Authentication
https://support.google.com/accounts/answer/185839
2. Create App Password
https://support.google.com/accounts/answer/185833
3. Use the APP password as your EMAIL_HOST_PASSWORD in your settings file
It should work after that +1

Not working for me dear

enable access to the less secure app is ON, still seeing the same error? does anyone got solution.

From google.

To help keep your account secure, from May 30, 2022, Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.

https://support.google.com/accounts/answer/6010255?hl=en

After turning Less Secure App to ON, generate an app password and you put
it your django project setting
EMAIL_HOST_USER = "your email"
DEFAULT_FROM_EMAIL = 'your default email'
SERVER_EMAIL = 'your server email
EMAIL_HOST_PASSWORD = "your generated app password"
On Sun, May 15, 2022 at 4:55 AM pratikgho @.***> wrote:

enable access to the less secure app is ON, still seeing the same error?
does anyone got solution.
—
Reply to this email directly, view it on GitHub
https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1126853838,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUMSFJHQE3ESFRE5W6T27UTVKBYTBANCNFSM4RTP26EQ
.
You are receiving this because you commented.Message ID:
@.***>

What's the problem here??
On Mon, Jun 6, 2022 at 2:17 PM kaudit @.***> wrote:

From google.
To help keep your account secure, from May 30, 2022, Google no longer
supports the use of third-party apps or devices which ask you to sign in to
your Google Account using only your username and password.
https://support.google.com/accounts/answer/6010255?hl=en http://url
—
Reply to this email directly, view it on GitHub
https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1147436509,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUMSFJF6SYEZX54SRFZKU2DVNX243ANCNFSM4RTP26EQ
.
You are receiving this because you commented.Message ID:
@.***>

I tried to find that section of enabling less secure apps on google account, but it was available, This is the message I am getting from less secure app of my newly created account

This setting is no longer available

From Google, the say they  longer supports the use of third-party apps or devices which ask you to sign in to
your Google Account using only your username and password

FAZ ESSE TUTORIAL
https://www.youtube.com/watch?v=uVDq4VOBMNM

Working Sent from my Huawei Mobile-------- Original Message --------Subject: Re: [CoreyMSchafer/code_snippets] (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials gj6sm7456452pjb.10 - gsmtp') (#135)From: Weslley Pablo To: CoreyMSchafer/code_snippets CC: Joachim nedaouka ,Comment
FAZ ESSE TUTORIAL
https://www.youtube.com/watch?v=uVDq4VOBMNM
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>
[
{
@.": "http://schema.org",
@.": "EmailMessage",
"potentialAction": {
@.": "ViewAction",
"target": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1151638907",
"url": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1151638907",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
@.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]

Hi, it seems google have disabled the toggle.
I am unable to turn off less secure apps from my end

Hello!! Let me check itSent from my Huawei Mobile-------- Original Message --------Subject: Re: [CoreyMSchafer/code_snippets] (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials gj6sm7456452pjb.10 - gsmtp') (#135)From: osinaike gbemileke To: CoreyMSchafer/code_snippets CC: Joachim nedaouka ,Comment
Hi, it seems google have disabled the toggle.
I am unable to turn off less secure apps from my end
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>
[
{
@.": "http://schema.org",
@.": "EmailMessage",
"potentialAction": {
@.": "ViewAction",
"target": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1152962375",
"url": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1152962375",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
@.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]

has anyone managed to come up with solution regarding this isssue.

Hello Guy !! Try to create a new email address just for test and check if LESS SECURE settings are still disabled. Let me know if done. Sent from my Huawei Mobile-------- Original Message --------Subject: Re: [CoreyMSchafer/code_snippets] (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials gj6sm7456452pjb.10 - gsmtp') (#135)From: osinaike gbemileke To: CoreyMSchafer/code_snippets CC: Joachim nedaouka ,Comment
Hi, it seems google have disabled the toggle.
I am unable to turn off less secure apps from my end
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>
[
{
@.": "http://schema.org",
@.": "EmailMessage",
"potentialAction": {
@.": "ViewAction",
"target": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1152962375",
"url": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1152962375",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
@.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]

has anyone managed to come up with solution regarding this isssue.
waiting for the solution...

has anyone managed to come up with solution regarding this isssue.
waiting for the solution...

I have manged to fix my issue as Google have disabled the less secure apps recently. All I had to do was make my google account 2 factor authentication, then generate a new app password to use within the settings.py of django app for email password. Hope it helps

Test enabling “Access for less secure apps” (which just means the
client/app doesn’t use OAuth 2.0 - https://oauth.net/2/) for the account
you are trying to access.  It's found in the account settings on the
Security tab, Account permissions (not available to accounts with 2-step
verification enabled):
https://support.google.com/accounts/answer/6010255?hl=en
disable 2-step verification if enabled.
On Mon, Jun 13, 2022 at 4:57 PM Mahbub Rahman @.***>
wrote:

has anyone managed to come up with solution regarding this isssue.
waiting for the solution...
I have manged to fix my issue as Google have disabled the less secure apps
recently. All I had to do was make my google account 2 factor
authentication, then generate a new app password to use within the
settings.py of django app for email password. Hope it helps
—
Reply to this email directly, view it on GitHub
https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1154098006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANZL6IC26EM2V35UVCGGTYDVO5LANANCNFSM4RTP26EQ
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

https://support.google.com/accounts/answer/6010255?hl=en
On Mon, Jun 13, 2022 at 4:07 PM T H E D A R K A G E @.***>
wrote:

Test enabling “Access for less secure apps” (which just means the
client/app doesn’t use OAuth 2.0 - https://oauth.net/2/) for the account
you are trying to access.  It's found in the account settings on the
Security tab, Account permissions (not available to accounts with 2-step
verification enabled):
https://support.google.com/accounts/answer/6010255?hl=en
disable 2-step verification if enabled.
On Mon, Jun 13, 2022 at 4:57 PM Mahbub Rahman @.***>
wrote:

has anyone managed to come up with solution regarding this isssue.
waiting for the solution...
I have manged to fix my issue as Google have disabled the less secure
apps recently. All I had to do was make my google account 2 factor
authentication, then generate a new app password to use within the
settings.py of django app for email password. Hope it helps
—
Reply to this email directly, view it on GitHub
https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1154098006,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANZL6IC26EM2V35UVCGGTYDVO5LANANCNFSM4RTP26EQ
.

I have manged to fix my issue as Google have disabled the less secure apps recently. All I had to do was make my google account 2 factor authentication, then generate a new app password to use within the settings.py of django app for email password. Hope it helps

How did you generate a new password?
I am trying to solve this problem, I have now the authentication in 2 factors, but I got block. And I need to solve faster this problem for a project that I need to present in few days

Follow this article: Create & use App Passwords
https://support.google.com/accounts/answer/185833?hl=en
On Wed, Jun 15, 2022 at 10:08 PM Andreea David @.***>
wrote:

has anyone managed to come up with solution regarding this isssue.
waiting for the solution...
I have manged to fix my issue as Google have disabled the less secure apps
recently. All I had to do was make my google account 2 factor
authentication, then generate a new app password to use within the
settings.py of django app for email password. Hope it helps
How did you generate a new password?
I am trying to solve this problem, I have now the authentication in 2
factors, but I got block. And I need to solve faster this problem for a
project that I need to present in few days
—
Reply to this email directly, view it on GitHub
https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1156945145,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANZL6IH2YGWCZ6G3RBMPLS3VPJA4ZANCNFSM4RTP26EQ
.

I have manged to fix my issue as Google have disabled the less secure apps
recently. All I had to do was make my google account 2 factor
authentication, then generate a new app password to use within the
settings.py of django app for email password. Hope it helps
How did you generate a new password?
I am trying to solve this problem, I have now the authentication in 2
factors, but I got block. And I need to solve faster this problem for a
project that I need to present in few days
—
Reply to this email directly, view it on GitHub
https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1156945145,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANZL6IH2YGWCZ6G3RBMPLS3VPJA4ZANCNFSM4RTP26EQ
.
 Go to Security. then Turn on 2-step verification. Then App Password ta will be enable. From App Password you can generate password. use this password for authentication purposes

I got a message on Security section that  To protect your account, apps and devices that use less secure sign-in technology are blocked. To keep your account secure, Google will automatically turn this setting OFF if it’s not being used.]

Show This Error: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials m1sm1619710pjo.10 - gsmtp')
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_USE_TLS = True EMAIL_PORT = 587 EMAIL_HOST_USER = '(Here I Give My Email)' EMAIL_HOST_PASSWORD = '(Here I Give My Email Password)'
every thing is complete but email not send....!!!

Now you cannot turn on less secure app as the deadline was 30th May 2022

I am using flask and same issue is happening for me . what to do

Hey, community, I did as follows and read everyone's comments in this thread and I keep getting the same kickback message.

Hey, I have fixed it.
You need to go into your google accounts settings and then go to "security". Then scroll down to "app passwords". There you can generate a code that will work as a password.
Do not share that code with anyone.
I was able to complete this. Hope this helps.
Feel free to ask more.

Hey, I have fixed it.
You need to go into your google accounts settings and then go to "security". Then scroll down to "app passwords". There you can generate a code that will work as a password.
Do not share that code with anyone.
I was able to complete this. I hope this helps.
Feel free to ask more.

Hey, I have fixed it. You need to go into your google accounts settings and then go to "security". Then scroll down to "app passwords". There you can generate a code that will work as a password.
Do not share that code with anyone.
I was able to complete this. Hope this helps.
Feel free to ask more.

Hey, I have fixed it. You need to go into your google accounts settings and then go to "security". Then scroll down to "app passwords". There you can generate a code that will work as a password.
Do not share that code with anyone.
I was able to complete this. Hope this helps.
Feel free to ask more.

I did go into my Google Mail Settings and Turned on the 2 Step Verification and created the App Password. I put that password into my Settings.py and I still get:
SMTPAuthenticationError at /register/
(535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials b22-20020a63e716000000b004298d7b6e70sm1862321pgi.54 - gsmtp')
The Code Reads as follows:
Settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER =<EMAIL_ADDRESS>EMAIL_HOST_PASSWORD = '****************'
The code in
Signals.py
from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from django.contrib.auth.models import User
from .models import Profile
from django.core.mail import send_mail
from django.conf import settings
@receiver(post_save, sender=Profile)
def createProfile(sender, instance, created, **kwargs):
if created:
user = instance
profile = Profile.objects.create(
user=user,
username=user.username,
email=user.email,
name=user.first_name,
)
    subject = 'Welcome to DevSearch'
    message = 'We are glad you are here!'

    send_mail(
        subject,
        message,
        settings.EMAIL_HOST_USER,
        [profile.email],
        fail_silently=False,
    )

Enable less secure app login for your google account, by default google doesn't allow you to login to smtp server. Go here >>https://myaccount.google.com/lesssecureapps and enable it and you will be good to go.

it doesnt work anymore

YesI just turned ON my Google account LESS SECURE security settings and generate an app password. Then I was able to fix the problem Sent from my Huawei Mobile-------- Original Message --------Subject: Re: [CoreyMSchafer/code_snippets] (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8  https://support.google.com/mail/?p=BadCredentials gj6sm7456452pjb.10 - gsmtp') (#135)From: Mahbub Rahman To: CoreyMSchafer/code_snippets CC: Joachim nedaouka ,Comment
has anyone managed to come up with solution regarding this isssue.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>
[
{
@.": "http://schema.org",
@.": "EmailMessage",
"potentialAction": {
@.": "ViewAction",
"target": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1153002782",
"url": "https://github.com/CoreyMSchafer/code_snippets/issues/135#issuecomment-1153002782",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
@.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]


Error uploading image

Traceback (most recent call last):
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/views/decorators/cache.py", line 38, in _cache_controlled
response = viewfunc(request, *args, **kw)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 21, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/wagtail/wagtailimages/views/chooser.py", line 124, in chooser_upload
if form.is_valid():
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/forms/forms.py", line 162, in is_valid
return self.is_bound and not bool(self.errors)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/forms/forms.py", line 154, in errors
self.full_clean()
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/forms/forms.py", line 353, in full_clean
self._clean_fields()
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/forms/forms.py", line 366, in _clean_fields
value = field.clean(value, initial)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/forms/fields.py", line 606, in clean
return super(FileField, self).clean(data)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/django/forms/fields.py", line 150, in clean
value = self.to_python(value)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/wagtail/wagtailimages/fields.py", line 127, in to_python
self.check_image_file_size(f)
File "/home/vagrant/webproject/aroucageopark/virtualenv/local/lib/python2.7/site-packages/wagtail/wagtailimages/fields.py", line 120, in check_image_file_size
filesizeformat(f.size),
TypeError: format requires a mapping

Sorry, this happens on version 1.0b2

What version of Django are you using?

This appears to be caused by a bad format string replacement:
https://github.com/torchbox/wagtail/blob/master/wagtail/wagtailimages/fields.py#L34-L38
https://github.com/torchbox/wagtail/blob/master/wagtail/wagtailimages/fields.py#L119-L121
(using a tuple instead of a dict)
I noticed a few other places in that file which could potentially cause issues so I think it's worth cleaning that up a bit.

PR #1368


Cannot build without static libraries

To reproduce, build by configuring with ./configure ... --disable-static ...
This results in libyara.a being nonexistent during make, which causes make to fail.

Can you provide the command sequence you used and its output?

I was on a different machine that I don't have access to -- I can reattempt the build Monday and give you some output, but the gist was
./configure --prefix=/usr --disable-static
make
Which resulted in an ENOENT for libyara.a, if memory serves.

We noticed the same issue in nixpkgs https://github.com/NixOS/nixpkgs/pull/73164#issuecomment-552206647, we used to workaround it by using a patch like https://github.com/andir/nixpkgs/commit/5f75f72497113001bbd464018db233fee13b0ed9.

This issue should be solved by https://github.com/VirusTotal/yara/commit/04df811fa61fa54390b274bfcf56d7403c184404. Please re-open if the fix doesn't work for you.


Would be nice if you could add a list of OpenSource tools for WAFs

You could start eg with the https://github.com/globaldatanet/aws-firewall-factory

There is already a tooling section: https://github.com/0xInfection/Awesome-WAF#awesome-tools
If you think the tool you've mentioned is security centric and belongs to one of the categories in there, feel free to create a PR. Cheers!


Unrecognized option: 'u'

Hello. I am getting the following error while compressing PNG files.
Unrecognized option: 'u'
Works fine with JPEG.

Never mind, I fixed it. Thank you. Great library.


Update Ditto SDK to 4.4.4

Updated to Ditto 4.4.4 and bumped versions.

I think update should include DittoSwiftTools update to v4.4.0?

I think update should include DittoSwiftTools update to v4.4.0?

@magicwave Thanks, updated that too


Button border change to stop looking rounded on MacOS

This PR it to fix issue #20

add border style and colour to fix horrible rounded edges on mac

LGTM :+1:


(maint) stop reusing import-export-test functions

Before this patch, we had some functions in our import-export-roundtrip test
that were used in other test namespaces.  This prevented us from using our
fixtures namespace in any of the http tests due to a cyclic dependency, which
I need for PDB-1737. This will break sync testing, but the fix will be
straightforward.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1744/

This looks fine to me and passes tests against both DBs.  Though (minor) if we have another version, I might find a commit summary line like "relocate import/export util functions" a little clearer.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://jenkins.puppetlabs.com/job/platform_puppetdb_intn-sys_pr/1745/


Sometimes wal-e fails to push backup to s3

Hi.
Recently I've noticed that sometimes wal-e --aws-instance-profile backup-push sometimes fails to push backup to S3 with the following message:
wal_e.worker.upload INFO     MSG: begin uploading a base backup volume
        DETAIL: Uploading to "s3://our-bucket/clustername/wal/basebackups_005/base_00000026000018D80000003E_10935416/tar_partitions/part_00000154.tar.lzo".
        STRUCTURED: time=2017-02-19T13:28:50.695937-00 pid=18726
boto         ERROR    Caught exception reading instance data
        Traceback (most recent call last):
          File "/usr/lib/python3.4/urllib/request.py", line 1182, in do_open
            h.request(req.get_method(), req.selector, req.data, headers)
          File "/usr/lib/python3.4/http/client.py", line 1125, in request
            self._send_request(method, url, body, headers)
          File "/usr/lib/python3.4/http/client.py", line 1163, in _send_request
            self.endheaders(body)
          File "/usr/lib/python3.4/http/client.py", line 1121, in endheaders
            self._send_output(message_body)
          File "/usr/lib/python3.4/http/client.py", line 951, in _send_output
            self.send(msg)
          File "/usr/lib/python3.4/http/client.py", line 886, in send
            self.connect()
          File "/usr/lib/python3.4/http/client.py", line 863, in connect
            self.timeout, self.source_address)
          File "/usr/local/lib/python3.4/dist-packages/gevent/socket.py", line 99, in create_connection
            raise err # pylint:disable=raising-bad-type
          File "/usr/local/lib/python3.4/dist-packages/gevent/socket.py", line 86, in create_connection
            sock.connect(sa)
          File "/usr/local/lib/python3.4/dist-packages/gevent/_socket3.py", line 306, in connect
            self._wait(self._write_event)
          File "/usr/local/lib/python3.4/dist-packages/gevent/_socket3.py", line 157, in _wait
            self.hub.wait(watcher)
          File "/usr/local/lib/python3.4/dist-packages/gevent/hub.py", line 651, in wait
            result = waiter.get()
          File "/usr/local/lib/python3.4/dist-packages/gevent/hub.py", line 899, in get
            return self.hub.switch()
          File "/usr/local/lib/python3.4/dist-packages/gevent/hub.py", line 630, in switch
            return RawGreenlet.switch(self)
        socket.timeout: timed out

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "/usr/local/lib/python3.4/dist-packages/boto/utils.py", line 210, in retry_url
            r = opener.open(req, timeout=timeout)
          File "/usr/lib/python3.4/urllib/request.py", line 463, in open
            response = self._open(req, data)
          File "/usr/lib/python3.4/urllib/request.py", line 481, in _open
            '_open', req)
          File "/usr/lib/python3.4/urllib/request.py", line 441, in _call_chain
            result = func(*args)
          File "/usr/lib/python3.4/urllib/request.py", line 1210, in http_open
            return self.do_open(http.client.HTTPConnection, req)
          File "/usr/lib/python3.4/urllib/request.py", line 1184, in do_open
            raise URLError(err)
        urllib.error.URLError: <urlopen error timed out>
boto         ERROR    Unable to read instance data, giving up
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 62, in shim
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 140, in put_file_helper
    return self.blobstore.uri_put_file(self.creds, url, tf)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 52, in uri_put_file
    k = _uri_to_key(creds, uri, conn=conn)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 36, in _uri_to_key
    conn = cinfo.connect(creds)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/calling_format.py", line 207, in connect
    return connection.S3Connection(**_s3connection_opts_from_uri(impl))
  File "/usr/local/lib/python3.4/dist-packages/boto/s3/connection.py", line 191, in __init__
    validate_certs=validate_certs, profile_name=profile_name)
  File "/usr/local/lib/python3.4/dist-packages/boto/connection.py", line 569, in __init__
    host, config, self.provider, self._required_auth_capability())
  File "/usr/local/lib/python3.4/dist-packages/boto/auth.py", line 997, in get_auth_handler
    'Check your credentials' % (len(names), str(names)))
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['S3HmacAuthV4Handler'] Check your credentials

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/gevent/greenlet.py", line 536, in run
    result = self._run(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 145, in __call__
    k = put_file_helper()
  File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 72, in shim
    exc_processor_cxt=exc_processor_cxt)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 104, in retry_with_count_internal
    side_effect_func(exc_tup, exc_processor_cxt)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 135, in log_volume_failures_on_error
    raise typ(value).with_traceback(tb)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 62, in shim
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 140, in put_file_helper
    return self.blobstore.uri_put_file(self.creds, url, tf)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 52, in uri_put_file
    k = _uri_to_key(creds, uri, conn=conn)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 36, in _uri_to_key
    conn = cinfo.connect(creds)
  File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/calling_format.py", line 207, in connect
    return connection.S3Connection(**_s3connection_opts_from_uri(impl))
  File "/usr/local/lib/python3.4/dist-packages/boto/s3/connection.py", line 191, in __init__
    validate_certs=validate_certs, profile_name=profile_name)
  File "/usr/local/lib/python3.4/dist-packages/boto/connection.py", line 569, in __init__
    host, config, self.provider, self._required_auth_capability())
  File "/usr/local/lib/python3.4/dist-packages/boto/auth.py", line 997, in get_auth_handler
    'Check your credentials' % (len(names), str(names)))
boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['S3HmacAuthV4Handler'] Check your credentials
Sun Feb 19 13:28:52 2017 <Greenlet at 0x7fc7b826b3d8: <wal_e.worker.upload.PartitionUploader object at 0x7fc7b82bae80>([ExtendedTarInfo(submitted_path='/home/postgres/pg)> failed with NoAuthHandlerFound

wal_e.operator.backup WARNING  MSG: blocking on sending WAL segments
        DETAIL: The backup was not completed successfully, but we have to wait anyway.  See README: TODO about pg_cancel_backup
        STRUCTURED: time=2017-02-19T13:28:52.151230-00 pid=18726
wal_e.worker.upload INFO     MSG: begin uploading a base backup volume
        DETAIL: Uploading to "s3://our-bucket/clustername/wal/basebackups_005/base_00000026000018D80000003E_10935416/tar_partitions/part_00000155.tar.lzo".
        STRUCTURED: time=2017-02-19T13:28:53.237277-00 pid=18726
NOTICE:  pg_stop_backup complete, all required WAL segments have been archived
wal_e.main   CRITICAL MSG: An unprocessed exception has avoided all error handling
        DETAIL: Traceback (most recent call last):
          File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 62, in shim
            return f(*args, **kwargs)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 140, in put_file_helper
            return self.blobstore.uri_put_file(self.creds, url, tf)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 52, in uri_put_file
            k = _uri_to_key(creds, uri, conn=conn)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 36, in _uri_to_key
            conn = cinfo.connect(creds)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/calling_format.py", line 207, in connect
            return connection.S3Connection(**_s3connection_opts_from_uri(impl))
          File "/usr/local/lib/python3.4/dist-packages/boto/s3/connection.py", line 191, in __init__
            validate_certs=validate_certs, profile_name=profile_name)
          File "/usr/local/lib/python3.4/dist-packages/boto/connection.py", line 569, in __init__
            host, config, self.provider, self._required_auth_capability())
          File "/usr/local/lib/python3.4/dist-packages/boto/auth.py", line 997, in get_auth_handler
            'Check your credentials' % (len(names), str(names)))
        boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['S3HmacAuthV4Handler'] Check your credentials

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "/usr/local/lib/python3.4/dist-packages/wal_e/cmd.py", line 627, in main
            pool_size=args.pool_size)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/operator/backup.py", line 197, in database_backup
            **kwargs)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/operator/backup.py", line 500, in _upload_pg_cluster_dir
            pool.put(tpart)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload_pool.py", line 108, in put
            self._wait()
          File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload_pool.py", line 65, in _wait
            raise val
          File "/usr/local/lib/python3.4/dist-packages/gevent/greenlet.py", line 536, in run
            result = self._run(*self.args, **self.kwargs)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 145, in __call__
            k = put_file_helper()
          File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 72, in shim
            exc_processor_cxt=exc_processor_cxt)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 104, in retry_with_count_internal
            side_effect_func(exc_tup, exc_processor_cxt)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 135, in log_volume_failures_on_error
            raise typ(value).with_traceback(tb)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/retries.py", line 62, in shim
            return f(*args, **kwargs)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/worker/upload.py", line 140, in put_file_helper
            return self.blobstore.uri_put_file(self.creds, url, tf)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 52, in uri_put_file
            k = _uri_to_key(creds, uri, conn=conn)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/s3_util.py", line 36, in _uri_to_key
            conn = cinfo.connect(creds)
          File "/usr/local/lib/python3.4/dist-packages/wal_e/blobstore/s3/calling_format.py", line 207, in connect
            return connection.S3Connection(**_s3connection_opts_from_uri(impl))
          File "/usr/local/lib/python3.4/dist-packages/boto/s3/connection.py", line 191, in __init__
            validate_certs=validate_certs, profile_name=profile_name)
          File "/usr/local/lib/python3.4/dist-packages/boto/connection.py", line 569, in __init__
            host, config, self.provider, self._required_auth_capability())
          File "/usr/local/lib/python3.4/dist-packages/boto/auth.py", line 997, in get_auth_handler
            'Check your credentials' % (len(names), str(names)))
        boto.exception.NoAuthHandlerFound: No handler was ready to authenticate. 1 handlers were checked. ['S3HmacAuthV4Handler'] Check your credentials

        STRUCTURED: time=2017-02-19T13:28:59.724742-00 pid=18726

From this trace I've figured out that boto failed to get credentials from instance metadata and gave up.
As a temporary solution I've changed amount of retries from 10 to 100 in the /usr/local/lib/python3.4/dist-packages/boto/utils.py and it helped. Now I wonder, shouldn't wal-e handle such kind of exception as well or it simply should rely on boto?

What do you think? Ultimately taking forever to get credentials is a problem, so perhaps some timely termination is a good idea. On the other hand, it's fragile and ugly right now.

Obviously it was only our issue and it was related to the failing EC2 Instance.


Bump number of supported drivers

Looks like MinkExtension comes with support for 7 drivers out of the box

thanks


bug: Webpack Compilation Error

Hi, I'm having this error when using the failOnConsoleError plugin together with webpack when running the tests through the terminal.

"webpack": "5.88.2"
"cypress-fail-on-console-error": "4.0.3"
In the cypress.config.js file I just need to comment this line import failOnConsoleError from 'cypress-fail-on-console-error' and the webpack works.

I think it's relevant to give the version of Cypress you are using...
This works for me in a NX-workspace, maybe it gives you a hint to resolve your issue:
    "cypress": "12.14.0",
    "cypress-fail-on-console-error": "4.0.3",

    implicit<EMAIL_ADDRESS>
import failOnConsoleError, { Config } from 'cypress-fail-on-console-error';

const config: Config = {
  consoleMessages: [],
};
failOnConsoleError(config);

import { defineConfig } from 'cypress';

module.exports = defineConfig({
  ...
  e2e: {
    testIsolation: false,
    experimentalRunAllSpecs: true,
    setupNodeEvents(on, config) {
      return config;
    },
    specPattern: './src/integration/**/*.cy.{js,jsx,ts,tsx}',
    supportFile: './src/support/index.ts',
  },
});

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "sourceMap": false,
    "outDir": "../../dist/out-tsc",
    "allowJs": true,
    "types": ["cypress", "node"],
    "forceConsistentCasingInFileNames": true,
    "strict": true,
    "noImplicitOverride": true,
    "noPropertyAccessFromIndexSignature": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true
  },
  "include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"]
}

Hi @lucasdonato,
as of today, os package is no dependency anymore. Please verify with version 5.0.0. Please give some feedback.
Cheers

Hi @nils-hoyer , it worked perfectly! Thanks.


Support space-between in form field

Is your feature request related to a problem? Please describe.
I'm trying to create this type of UI:

with web components, but unfortunately, it isn't easily doable.
I was suggested to use formfield but this gives me this:

or:

when I add alignEnd to mwc-formfield
Describe the solution you'd like
I'd like to have the ability to easily add space between label and slot inside mwc-formfield.
Proposed syntax:

Results I'm expecting to get:

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
I was suggested by @asyncLiz (in https://github.com/material-components/material-components-web-components/issues/999) to create this FR. Maybe she will be able to add additional context to this.
I've tried doing that with styles, but I wasn't able to get results I want:
https://stackblitz.com/edit/material-web-components-fiqjsb?file=index.js

Upstream dependent on https://github.com/material-components/material-components-web/issues/5747

Fixed in #1083

@asyncLiz thank you 🙂


How to ensure security with  refresh token which is generated once

When we login to developer account and generate the refresh token by running AuthServer.py, which will write the refreshToken into AlexaClientSDKConfig.json file.
"authDelegate":{
"clientSecret":"",
"deviceSerialNumber":"",
"refreshToken":"",
"clientId": "",
"productId":"",
},
This refresh token is generated once.
When this refreshToken will get expire?
If not expired, then the same token can be used in another device while connecting to AVS cloud.
So How AVS cloud ensure the same token cannot be used by another device and another login user?

Hi @sumit3817 ,
The login method has been changed in v1.7.0.
The same refreshToken will conflict when used in different devices at same time, so each device should use a different serial number to log in to prevent conflicts.

Hi @sumit3817, per @sugrsugr's comment, please consider the refresh token and auth token as per-device, and each device is uniquely identified via its serial number.  Per 1.7, this is defined within AlexaClientSDKConfig.json - deviceInfo.deviceSerialNumber.
Both tokens are given to a device by LWA, so you don't need to worry about their uniqueness or value.
Generally, refresh tokens are invalidated by LWA at its discretion, and will also occur if a device is de-registered from a user's account.
Please let us know if this does not answer your question, thanks.


Require path resolution not working as documented (at least on Windows)

Despite the documentation saying that By default the require path is the location of the standard library that comes with the compiler, and the "lib" directory relative to the current working directory (given by pwd in a Unix shell). this does not work, at least on Windows with 1.3.2
Consider the following folder structure
- project
  foo.cr
    - lib
      bar.cr

Content of foo.cr
require "bar"

say_hello()

Content of bar.cr
def say_hello
  puts "Hello Penny!"
end

Running the crystal compiler from the project folder with crystal foo.cr produces the error
In foo.cr:1:1

 1 | require "bar"
     ^
Error: can't find file 'bar'

@Blacksmoke16 Does your adding of the platform:windows label mean this works as expected on Unix-likes?

@stefandd Yes, if I had to guess I would say that on windows the CRYSTAL_PATH environmental variable isn't set correctly, which is what defines where the compiler searches for required files. For example:
$ crystal env CRYSTAL_PATH
lib:/usr/lib/crystal

Could try running that on windows and see if its empty or what. Workaround would be to manually set that var to point to lib and wherever your source code is.
Ref: https://crystal-lang.org/reference/1.3/using_the_compiler/index.html#environment-variables

Actually this might be fixed next release as part of https://github.com/crystal-lang/crystal/pull/11524.

@stefandd Yes, if I had to guess I would say that on windows the CRYSTAL_PATH environmental variable isn't set correctly,

Just to note: I actually had correctly set the CRYSTAL_PATH variable by set CRYSTAL_PATH=c:\crystal\src

@Blacksmoke16 No, https://github.com/crystal-lang/crystal/pull/11524 is only about the helper tool for stdlib and compiler development.
You would not use that wrapper when running the compiler normally.
@stefandd If you want the compiler to pick up libs in lib folder, you need to add lib to CRYSTAL_PATH.
How did you install crystal?

If you want the compiler to pick up libs in lib folder, you need to add lib to CRYSTAL_PATH.

But this is contrary to what the documentation says that I quoted above. It states that it will always look at the lib folder relative to the current folder (without any mention that enviroment variables need to be set)

The documentation states that this is the default behaviour. If you set the environment variable CRYSTAL_PATH to choose a different path than the compiler's default, the stated behaviour no longer applies.
Usually, you should not need to specify CRYSTAL_PATH. This depends on how the compiler was built, though. If done correctly, it has a default path baked in that finds the location of the standard library relative to the location of the compiler binary, and also includes the lib folder relative to the working directory.
How did you install Crystal and why did you need to set CRYSTAL_PATH?

How did you install Crystal and why did you need to set CRYSTAL_PATH?

Indeed, if I do not define CRYSTAL_PATH, this works as expected: finding the relative lib folder in whichever folder the compiler is run from. Should I close this issue, even though this behavior is imo not properly documented. With the wording from https://crystal-lang.org/reference/1.3/syntax_and_semantics/requiring_files.html that I quoted above it should not at all matter whether or not  CRYSTAL_PATH is defined since it states that a folder 'lib' relative to the current working directory is searched.

Indeed, if I do not define CRYSTAL_PATH, this works as expected

Oh well, if you're mucking with that variable to not include lib, then yea this is working as designed. Your issue made it seem like you were just using a default install of it and running into this problem.
Your quote covers the default value of CRYSTAL_PATH, once you manually edit it, it's no longer using the defaults so ofc it wouldn't work w/o lib included in it.

Oh well, if you're mucking with that variable to not include lib, then yea this is working as designed. Your issue made it seem like you were just using a default install of it and running into this problem.

It may be working as designed, but not as described in the docs. The CRYSTAL_PATH variable presumably controls the default the require path but why should it alter that the compiler is supposed to in addition look in the "lib" directory relative to the current working directory (given by pwd in a Unix shell). ?

I think the wording is quite unambiguous that the require path is by default the location of stdlib + lib. It seems like a good idea to expand on that, though and describe what happens when you set CRYSTAL_PATH.

In my mind CRYSTAL_PATH is an artifact that the compiler uses to be able to distribute itself and have everything set up properly. I think we should encourage users to not modify this value. Everything works perfectly fine if you don't modify it.

@asterite  Should I simply close this then?

@asterite I agree. I just checked the reference and CRYSTAL_PATH's function is explained at https://crystal-lang.org/reference/1.3/using_the_compiler/index.html The problem is that the wording there does not make clear that besides revectoring the default require search path, setting this env variable also breaks the relative lib folder search. So maybe this could be clarified.


Get transaction value functions mentioned in docs not available

Description
What happened: errors are thrown when calling "get transaction value" functions for TopicCreateTransaction
Ex getAdminKey

Expected: functions to not throw and return appropriate values
Steps to reproduce
This is the code snippet
    const transaction = new TopicCreateTransaction()
        .setSubmitKey(thresholdKey);

    console.log(`The submit key is: ${transaction.getSubmitKey()}`);

Additional context
No response
Hedera network
testnet
Version
"@hashgraph/sdk": "^2.18.6"
Operating system
macOS

Greetings @mgarbs :wave:
For all property getters we provide native getters instead of getX methods
Therefore, for your specific case you should use transaction.submitKey or transaction.adminKey

Okay, I will update the docs to reflect this. Thank you! :)

We've synced with the team and decided to deprecate . submitKey and provide . getSubmitKey(). It will be changed into the next release.


Sometimes we don't want to auto-navigate on zipper create

Scenario
By default a new zipper will auto-navigate to the first non comment/whitespace node.
This is normally what we want.
But this is not always what we want.  For example we don't want this when walking a zipper, we want to hit all nodes so want to start from the root node.
First Idea
Zipper creation functions already have an options map.
Consider adding an option to not auto-navigate.
Maybe :auto-navigate with a default of true (for backward compatibility).
Alternative Idea
Make it dead simple to navigate to top regardless of your current position by adding a top fn to zip API.

Newer dupe #189 replaces this issue and proposes a better solution (thanks @mainej!)


feat: wire up second hop ui

Description

Pull Request Type

[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[ ] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes #
Risk

Testing

Engineering

Operations

Screenshots (if applicable)

Current dependencies on/for this PR:

develop

PR #5587

PR #5596

PR #5599

PR #5607

PR #5611   👈

This stack of pull requests is managed by Graphite.


A new Pr for  due to broken tests

Hi Rob, can you take a look? It is a continued PR from #47 one (needed to switch to internal repo's branch because of tests).

Moving to a new branch due to long inactivity


ENH: logical operator "in" for pd.Term

I don't know if this is possible with the current pytables implementation/interface, but I would find it useful to be able to do filtering like this on disk:
df = pd.read_hdf(dbname, 'df', where='colname in ["a","b"]')

that already works
what are you trying to do?

In [1]: df = DataFrame({'A' : ['foo','bar','baz'], 'B' : range(3) })

In [2]: df.to_hdf('test.h5','df',mode='w',format='table',data_columns=True)

In [3]: pd.read_hdf('test.h5','df',where='A in ["bar","baz"]')
Out[3]:
     A  B
1  bar  1
2  baz  2

In [4]: pd.read_hdf('test.h5','df',columns=['A'])
Out[4]:
     A
0  foo
1  bar
2  baz

Ah, thanks. I only saw "columns in ['A', 'D']" in the list of allowed expressions  and even didn't try it then. (As this columns is of course reserved to select on columns themselves, not their content. I now see that the section about pd.Categorical is the first mentioning the in operator to be used to select rows. Should this maybe be mentioned in the upper general querying section of the docs?

yep could use an example in this section
http://pandas.pydata.org/pandas-docs/stable/io.html#querying


[Contribution] Add TrendMicro Azure ML vulnerabilities

Summary (give a brief description of the issue)

We investigated Azure ML, a managed MLaaS from Microsoft. Our findings talk of two broad classes of security issues, namely:
Insecure logging of sensitive information: We found five instances of credentials leaking in cleartext on Compute Instances due to insecure usage of open-source components and insecure system design of how the environment was being provisioned.
Sensitive information disclosure: We found a case of exposed APIs in cloud middleware leaking sensitive information from Compute Instances. Network-adjacent attackers could leverage the vulnerability after initial access to laterally move or snoop in on the commands executed using a Jupyter terminal on a Compute Instance.

References (provide links to blogposts, etc.)
https://www.blackhat.com/us-23/briefings/schedule/#uncovering-azures-silent-threats-a-journey-into-cloud-vulnerabilities-33073
http://i.blackhat.com/BH-US-23/Presentations/US-23-Surana-Uncovering-Azures-Silent-Threats.pdf?_gl=1*11qc3l2*_gcl_au*MTU0NDI0MzU5OC4xNjkxNjQ5Nzc3*_ga*MTU3MjI2MDY5MS4xNjkxNjQ5Nzc3*_ga_K4JK67TFYV*MTY5MTkxNDcwNi41LjEuMTY5MTkxNDc3OC4wLjAuMA..&_ga=2.9116469.141935915.1691649777-1572260691.1691649777

One of these might be related to this.

blog: https://www.trendmicro.com/vinfo/us/security/news/cybercrime-and-digital-threats/uncovering-silent-threats-in-azure-machine-learning-service-part-I which confirms relationship with #200


Allow setting group active status

This need to be reviewed and merged so that group functionality is available for general use in the next release (1.7.1).

@hyi and @alvacouch Please review.

Can one of the admins verify this patch?

@mjstealey It seems PR build on Jenkins is not working since yesterday.

I am concerned about semantics. We started this thread because one needs to be able to delete a group without wrecking provenance. We decided that this would be best accomplished by setting the group to inactive. However, the current code leaves that group visible to the owner even after it is "deleted'. Thus we lose the ability to "delete" a group, and instead, the group is present in the owner's list forever. Meanwhile, the user can "undelete" the group, which is fine, but this means that one can never fully remove a group from the list of the original creator.
It seems to me that the concepts of "inactive" and "deleted" have become dangerously conflated.

If a group is made inactive I think someone should have access to it. Otherwise, I don't see the point of making inactive. If no one should have access to a group, then we should delete it.

Jenkins admin needs to whitelist request for testing.

Is "delete group" still supported? If so I +1 this and we can think about it later.

Group deletion is not supported. But I think that one is much easier to implement with few lines of code compared to 'active' status change.

It seems that we really need to think about what we are doing here, then. The fear was that groups would be referenced from other internal sources and that we would lose references. But active/inactive is a different concept. I would suggest that -- in the same manner as for active/inactive -- that delete sets a flag "deleted".  This would satisfy both needs: active/inactive and present/deleted, in the sense that a deleted group would remain in provenance but would disappear from the group listing for the owner.

Let's +1 this for now and then think about delete a bit more.

I agree with the suggestion for introducing  a new flag 'deleted' for group.

@alvacouch I will merger this then as soon as my last commit build passes on Jenkins.

@mjstealey Can I merge this even if the build is failing which is not unit test fail?

Last commit build seems to be successful (http://ci.hydroshare.org:8080/job/github-commit-builder-hydroshare/48/) so merging this PR.


Update Understanding-ROS2-Parameters.rst

there is no load  command form ros2 param

We've now switched to one branch per distribution, and this particular change is only on the "rolling" branch.  So this particular PR shouldn't be necessary anymore.  I'm going to close this out, but feel free to reopen if this is still a problem for you.


continue learning

how to continue learning after PC shutdown?

You can modify the training code for that, check out the Tensorflow tutorial on how to do save/restore: https://www.tensorflow.org/versions/r0.9/how_tos/variables/index.html#saving-and-restoring


Add serviceAccount to avoid error with volume mounted

Since Openshift 0.6.1, I get this error when gerrit pod is created & volumes mounted
Error creating: Pod "gerrit-" is forbidden: unable to validate against any security context constraint: [provider restricted: .spec.containers[0].securityContext.privileged: invalid value 'true': Privileged containers are not allowed provider restricted: .spec.containers[0].securityContext.VolumeMounts: invalid value 'gerrit-admin-ssh-public-key': Host Volumes are not allowed to be used provider restricted: .spec.containers[0].securityContext.VolumeMounts: invalid value 'gerrit-workspace': Host Volumes are not allowed to be used provider restricted: .spec.containers[0].securityContext.VolumeMounts: invalid value 'gerrit-admin-ssh-private-key': Host Volumes are not allowed to be used provider restricted: .spec.containers[0].securityContext.VolumeMounts: invalid value 'gerrit-users-ssh-key': Host Volumes are not allowed to be used] (2

If you're running this on latest vagrant image in fabric8-installer then you just need to specify the serviceAccount to use - I see you're using the fabric8 maven plugin for generation of kube json so just add a property:
<fabric8.serviceAccount>fabric8</fabric8.serviceAccount>

merged


ISS-432 Read latest message or messages from a Kafka partition offset

PR Branch
#ADD LINK TO THE PR BRANCH
Motivation and Context
Checklist:

[ ] Unit tests added

[x] Integration tests added

[x] Test names are meaningful

[x] Feature manually tested

[x] Branch build passed

[ ] No 'package.*' in the imports

[ ] Relevant Wiki page updated with clear instruction for the end user

[ ] Not applicable. This was only a refactor change, no functional or behaviour changes were introduced

[ ] Http test added to http-testing module(if applicable) ?

[ ] Not applicable. The changes did not affect HTTP automation flow

[x] Kafka test added to kafka-testing module(if applicable) ?

[ ] Not applicable. The changes did not affect Kafka automation flow

Solves #432


⚠ Cioos Atlantic CKAN has degraded performance

In 27c59aa, Cioos Atlantic CKAN (https://catalogue.cioosatlantic.ca/) experienced degraded performance:

HTTP code: 503
Response time: 18167 ms

Resolved: Cioos Atlantic CKAN performance has improved in 9829fad.


Add optimistic sync acceptance tests

PR Description
We have already straightforward happy case in BellatrixMergeTransitionAcceptanceTest, this PR adds both possible optimistic sync cases.
Notes about this PR:

OptimisticSyncPostMergeAcceptanceTest verifies accidentally syncing execution layer after the merge, OptimisticSafeSlotsSyncPostMergeAcceptanceTest verifies that we could pass even merge slot optimistically after SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY with optimistic import if execution layer is syncing
I've removed .withLogConsumer(frame -> LOG.debug(frame.getUtf8String().trim())) line from BesuNode initialization, it duplicates log output, maybe I'm missing something, but there is one already in Node
getInternalIpAddress() in BesuNode looks ugly, but I have not found any other way to get internal container IP, hosts are not allowed in enode
OptimisticSafeSlotsSyncPostMergeAcceptanceTest needs 5 minutes between StatusMessage updates in order to resume sync, so this test takes a long time. Some way to disconnect teku nodes connection and then connect  them again could be an alternative, I have tried all ways to do this, but none is working

PS: Starting with draft to do several CI runs to clarify non-flaky
Fixed Issue(s)

Fixes #5074
Documentation

[x] I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

[x] I thought about adding a changelog entry, and added one if I deemed necessary.

Regarding https://github.com/ConsenSys/teku/pull/5751/commits/8f4ef822bcbc90fce9ca25602da9ff0510d450fd
In my test case I stop EL in the middle, then start new instance, so it's down for a while. We are on a gossip sync at this moment. We get in this case following chain:
SUCCESS<-SUCCESS<-FAILED_EXECUTION_PAYLOAD_EXECUTION<-UNKNOWN_PARENT<-UNKNOWN_PARENT...
First of all, ReexecutingExecutionPayloadBlockManager had incorrect comparison so it pruned the block in 1 slot. I've fixed this and added test for this case in commit. At second, why just 2 slots. Even on mainnet it's just 24 seconds and could be not enough to restart EL which suddenly gone down. I'm not sure what would be the best constant for it, say in rare case we should be able to drop bad block from it, which brakes EL but is not a correct canonical chain payload, in all other cases we'd better retry forever.
If we pruned it in 20 slots with this fix commit, do we have a way to fix the sync without Teku restart? If, say, EL was down for 25 slots?

Sorry to be so slow in reviewing this one.  I need to be able to focus and think it through properly but haven't managed to find that time yet. Will try to get to it tomorrow.

@ajsutton I've removed long running test, but, please, notice this comment
The remaining test is broken because of Besu issue https://github.com/hyperledger/besu/issues/3988
So it happens after Besu starts syncing again, last test assertion that we switch to normal sync. We could either wait for fix or remove this check

I've restored safe slots test with interop setup, it looks much simpler now by your advice, but stalls for the same reason that is mentioned above for 5 minutes. I've cheated with SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY == 1 but it could be flaky with this settings.
I've created issue for 5 minutes problems https://github.com/ConsenSys/teku/issues/5824
We couldn't verify returning to normal sync until this issue https://github.com/hyperledger/besu/issues/3988 is fixed and reached some Besu release, Besu fails to sync when the peer is added post-merge in both tests

I think we shouldn't merge this at least until #5824 is fixed

Ty


Is it possible for us to replace the text layer and export it ?

Hi, this plugin is cool for parse the psd layer,
I am thinking if this good plugin could manage the layer, for example, replace the text layer.

Unfortunately psd.rb cannot modify PSD data because it's impossible to modify just parts of the file without having to update the entire thing due to the file format. In order to prevent data loss, psd.rb would either need complete feature parity with Photoshop itself, or have to rely on some hacky solutions.
That said, it would be cool to allow psd.rb to generate new PSD's from scratch someday.
--
Ryan LeFevre (@meltingice)
Sr. Software Engineer
HODINKEE
On Thu, Dec 22, 2016 at 2:47 AM -0500, "SingleSeeker"<EMAIL_ADDRESS>wrote:
Hi, this plugin is cool for parse the psd layer,
I am thinking if this good plugin could manage the layer, for example, replace the text layer.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.