❓ [Question] unable to save the model in TorchScript format?

❓ Question
I'm trying to save my model as TorchScript format, unfortunately getting error.
What you have already tried
torch.jit.script(model)
Environment
python

Build information about Torch-TensorRT can be found by turning on debug messages

PyTorch Version (e.g., 1.0):1.11.0+cu113
CPU Architecture:
OS (e.g., Linux): ubuntu 20.04
How you installed PyTorch (conda, pip, libtorch, source): pip
Build command you used (if compiling from source):
Are you using local sources or building from archives:
Python version:3.9.7
CUDA version:11.7
GPU models and configuration: RTX GEFORCE 2060
Any other relevant information:

Additional context
could you please help me save the model in TorchScript format
@dignakov @narendasan @peri044

Can you provide an minimal example of what you are doing? Have you already compiled the model with Torch-TensorRT or is this before hand?

I have built the custom model and I'm trying to save the model inTorchScript format.
basically, when I run this line  torch.jit.script(model) I get this error.

If that is where you are hitting the issue then likely it is a problem with TorchScript and asking in https://github.com/pytorch/pytorch would probably be the best next step.


is there an example of creating Diamond node for decision element?

is it possible?

Yes, it is possible. To my understanding the idea behind react-flow project is to make it as flexible as possible without adding use case specific features. The project provides you with surface/node/edges/... and you need to implements all of logic you need for your use case.
For making a diamond node, you need to create a custom node with custom styling with make it diamond shape, for use it as a decision element, you need to define handles with different handleId, and when you parse the graph data (elements) in your app based on the edge handle-id you can tell which path to follow.
Here is a sneak-peak from the project, I'm working with ;-)

as @code-guru said, you need to implement a node like this by yourself. you can create a custom node and style it using css for example: https://css-tricks.com/the-shapes-of-css/#diamond-square-shape-via-joseph-silber
@code-guru that screenshot looks super cool, when will we get a live demo of this ;) ?

@chrtze I will share it soon, it will be an internal tool in a startup to be used by lawyers.

@chrtze I will share it soon 😀, it will be an internal tool in a startup to be used by lawyers.

Any update sharing code of that ? :)

@chrtze I will share it soon 😀, it will be an internal tool in a startup to be used by lawyers.

Any update sharing code of that ? :)

Hey @code-guru : We are working on a adding more shapes and extend this. Is there a way, you can share any sample of how you did this?

Hey @dosapati, great that you remind me.
Here is a demo for the project I developed for a client in Nov 2020 till March 2021, before their budget for the project hit the limit.
Bot Designer.
It is a visual designer tool meant to be used to lawyer to create a question flow, and then the data from this tool is fed to another app which turns the data to chatbot conversation flow, you can also see the demo here. After the user answered the questions, a contract or a Will (testament) will automatically generated based on the answers and paragraph bindings.
This project is designed to work as library and to be embedded to their admin portal, and integrate with their existing "paragraph builder" tool and backend via events.
The project only depend on react-flow for its graph/chart functionality. The last version of react-flow used was 9.0.4.
Thanks @chrtze and your team for this awesome project :)

Hey @code-guru thanks for the insights! The project looks great :)
@dosapati I created a codesandbox with a diamond shape: https://codesandbox.io/s/condescending-silence-lbzfd?file=/src/DiamondNode.js

This is really cool and helps a lot in shaping custom node. Appreciate your response on this.

Hey @code-guru thanks for the insights! The project looks great :)
@dosapati I created a codesandbox with a diamond shape: https://codesandbox.io/s/condescending-silence-lbzfd?file=/src/DiamondNode.js

Here is the design I tried using images. Now I can introduce the diamond and other shapes.

I see it difficulty to design icons of same W*H, now I get the nodes can't have straight edge and ended up with smoothstep edge. Any suggestions on this approach or any other better way to do this?

@dosapati you could still layout the nodes in a way that you get straight edges. When you know the dimensions you can use that to position the nodes vertically centered.

Yes, it is possible. To my understanding the idea behind react-flow project is to make it as flexible as possible without adding use case specific features. The project provides you with surface/node/edges/... and you need to implements all of logic you need for your use case.
For making a diamond node, you need to create a custom node with custom styling with make it diamond shape, for use it as a decision element, you need to define handles with different handleId, and when you parse the graph data (elements) in your app based on the edge handle-id you can tell which path to follow.
Here is a sneak-peak from the project, I'm working with ;-)

can u provide the code, as i have made the same shape but i m facing the stlying isssue, just need it for reference purpose


error in auto completion - fzf-completion:18: unrecognized modifier

Category

[ ] fzf binary
[ ] fzf-tmux script
[ ] Key bindings
- [X ] Completion
[ ] Vim
[ ] Neovim
[ ] Etc.

OS
- [X ] Linux

[ ] Mac OS X
[ ] Windows
[ ] Windows Subsystem for Linux
[ ] Etc.

Shell

[ ] bash
- [X ] zsh
[ ] fish

I get this error on my Linux every time i try to do autocomplete. e.g cd and then press Tab.
fzf-completion:18: unrecognized modifier
I try many things, upgrading to the latest zsh doesn't help.
The only thing is I can disable it in .fzf.zsh by removing this line.
[[ $- == i ]] && source "/local/home/kurniak/.fzf/shell/completion.zsh" 2> /dev/null
Otherwise I cannot use autocomplete at all.
Hopefully there is a way to enable this in my unix box.
Thanks

What's your exact zsh version?
I would first try if it's possible to reproduce the problem even with a minimal zshrc.

here is the version.
zsh 4.3.10 (x86_64-redhat-linux-gnu)
I tried to upgrade it with zsh 5.3 for linux, but it still does not work.
Thanks

We don't support that version of zsh (#665 #733) which was released in 2012.
I haven't experienced the problem with zsh 5 or above. Works fine with zsh 5.3.

does not work with 5.0.2

Works with 5.0.2. It is tested on Travis CI environment (trusty).
https://travis-ci.org/junegunn/fzf

I am currently using zsh 5.7.1  (x86_64-pc-linux-gnu) inside a tmux panel and I get the following error every time I press :
fzf-completion:24: unrecognized modifier

Is this related? How can I debug this?

I am currently using zsh 5.7.1 (x86_64-pc-linux-gnu) inside a tmux panel and I get the following error every time I press < TAB >:
fzf-completion:24: unrecognized modifier

Is this related? Should I open a new ticket?


Report Page UI Fixes (V.2)

https://projects.invisionapp.com/share/PMGANT0WFRV#/screens/285267485/comments

I'm going to make this in to different issues actually


Negative Solar Values

I have a bit of an unusual situation with my Powerwall setup that Tesla had to get involved in to remedy. The problem is that I have three solar systems, two of which are traditionally connected with the inverter breakers inside the PW gateway. The third solar system inverter breaker is installed an another subpanel that also has loads on it.
What would happen is that during the day when solar was being produced any load from that panel would be subtracted from the total solar production. Somehow Tesla was able to put 2 CTs on the GW (one for solar and one for loads) on the same circuit. Through some unknown magic in Tesla's back end, this all works correctly. The Tesla app shows the correct values when loads are turned on and off in that panel for both Home and Solar.
In the Powerwall Dashboard it is reading the actual CT values and the solar is getting reduced by the loads that are on the panel. Trying to figure out the weird math that Tesla is doing is beyond expectation but where it really is an issue is during non solar production. During non solar production these loads appear as negative solar values.
So at night the base load is 35 W which shows as -35W solar, and if I turn on lights in that panel then the negative solar is proportional (ie -300W).
So is there a way to at least set any negative solar values to 0 in the Powerwall Dashboard before placing them into the DB?
In this image you can see the negative solar starting at 20:00 when I had lights on a for a few hours.

So is there a way to at least set any negative solar values to 0 in the Powerwall Dashboard before placing them into the DB?

Hey @aesculus - I posted a discussion here in #112 that would allow you do this.
You could use a telegraf starlark script to filter the solar metrics before they are written to InfluxDB. I do this myself due to very small negative solar values when there is no production (i.e. night time) and would rather these be recorded as zeros.
Interesting issue however... I am wondering if there would be a way to reconfigure your CT connections for it to see correct values? I guess a knowledgeable electrician would be required and they seem hard to find sometimes.

I'll look at the telegraf script idea. Can you post what you did here? I would be satisfied with throwing out the negative values to start with. Fixing the reduced solar output based on the loads is a whole nother kettle of fish.
Actually Tesla came up with the solution using two sets of CTs and some magic in the back end. Before that it was not acceptable. Now from the Tesla app perspective its perfect.  So they are doing some magic with the two CT feeds which I really connect figure out.  Without this hack I was going to have to have some sort of remote CT read just for the breaker with the inverter on it and that was going to be problematic since its 400 feet away with a bunch buildings blocking signals etc.

I'll look at the telegraf script idea. Can you post what you did here? I would be satisfied with throwing out the negative values to start with.

Sure - below is an example cut-down version of the script that would do just what you need (set negative solar values to zero).

Edit your telegraf.local file
Add a section for [[processors.starlark]] and then add your source script

The example telegraf.local script below does the following:

if the solar power value is negative, the metric value is replaced with 0.0 instead

# Set negative solar values to zero
[[processors.starlark]]
  namepass = ["http"]
  source = '''
def apply(metric):
  solrpwr = metric.fields.get("solar_instant_power")

  if solrpwr != None:
    if solrpwr < 0:
      metric.fields["solar_instant_power"] = 0.0

  return metric
'''

After saving telegraf.local with your changes, restart the container to start using the filter:
# Restart telegraf
docker restart telegraf

If you have log output in your filter or to check for errors, you can view this as follows:
# View telegraf logs
docker logs -f telegraf

Check the full discussion thread #112 for more info however and other examples.

Fixing the reduced solar output based on the loads is a whole nother kettle of fish.

If you can work out what magic Tesla did with the values, perhaps you can replicate those calculations so the correct data is being logged to InfluxDB.

OK. I put the script into the telegraph.local and restarted telegraph. When the load exceeds the solar the Solar Generation on the Current State is now 0. Note though that the Power Flow animation still shows that negative 200 watts (which is the load I put on that circuit). Not sure where that is being fed from.

Another interesting tidbit that may be helpful in solving the bigger picture:  Note the difference between the battery discharge (980W) and the Home using (758W) which is about 220W. This is not what is shown on the Tesla app. In that instance both are showing the same amount. And the grid is 0 (Idle). Remember on that circuit that has the remote solar (the one that can go negative), that value is also used in the home load. So it appears that Tesla may be playing a game where any load on that circuit gets worked into the home load and they compare the PW discharge to what the home is reporting.
I need to do some investigation and find out what is actually measured and what is calculated. I know that solar is measure. I also know that home loads are measured. I am not sure about grid (don't think so because I have no CTs on the meter side that I am aware of. I think the PW discharge are measured.
So once I know what is actually measured I can probably come up with some algorithms to play games with sources and sinks that don't line up with various other readings during certain operations. I suspect now that is what Tesla is doing but it's outside the scope of their API I guess since it's being done in the back end and not the PW local.

The power flow animation is pulling the raw live numbers from the Powerwall GW (not InfluxDB) so it won't represent the changes you did to telegraf, unfortunately.  That gives more indication that Tesla is doing this on the backend.
Are you able to see all the CT values in the vitals payload (e.g. http://localhost:8675/vitals)?  If you can figure out the equation they are using with the values from vitals, you could replicate that in telegraf for the translated values.  Or alternatively, create a specialized pypowerwall (server.py) that does the translation for you (no telegraf translation needed). The advantage of that is that it would also show up correctly in the power flow animation.

I'll looking into the python route. Still scratching my head on the math. Once I have the pieces laid out it might become more clear.

Looking over the CT output I cannot recreate what is happening at all to make the Power Flow simulator.
What py file is currently driving that?
BTW the CSV output does seem to match the values.

Hi @aesculus  - the proxy is the server.py file.  It uses the pypowerwall python library to "proxy" the API calls.  The
These links might help troubleshoot by using the pypowerwall container:

Example animation - http://localhost:8675/example.html
The API calls that the animation uses would show up in - http://localhost:8675/stats

I suspect the API that would need to be adjusted would be:  /api/meters/aggregates - right now server.py just passes this payload directly to the user (telegraf or the animation).  I don't know which of these you would need to intercept and adjust but this section in server.py would be where you would add that:
https://github.com/jasonacox/pypowerwall/blob/fa35955b4b45a9de7809265b6811d61c2bd9dae5/proxy/server.py#L132-L134
Of course, all of that means that you have to figure out how Tesla is computing the real values on the backend.
Example payload from  /api/meters/aggregates
{
	"site": {
		"last_communication_time": "2023-06-13T19:28:59.922501695-07:00",
		"instant_power": 444,
		"instant_reactive_power": 421,
		"instant_apparent_power":<PHONE_NUMBER>79531,
		"frequency": 0,
		"energy_exported": 2843735.345945686,
		"energy_imported": 4872980.200026697,
		"instant_average_voltage":<PHONE_NUMBER>9908302,
		"instant_average_current": 8.592500000000001,
		"i_a_current": 0,
		"i_b_current": 0,
		"i_c_current": 0,
		"last_phase_voltage_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_power_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_energy_communication_time": "0001-01-01T00:00:00Z",
		"timeout":<PHONE_NUMBER>,
		"num_meters_aggregated": 1,
		"instant_total_current": 8.592500000000001
	},
	"battery": {
		"last_communication_time": "2023-06-13T19:28:59.916289015-07:00",
		"instant_power": 1120,
		"instant_reactive_power": -40,
		"instant_apparent_power": 1120.714058089752,
		"frequency": 59.997,
		"energy_exported": 9102210,
		"energy_imported": 10278620,
		"instant_average_voltage": 242.5,
		"instant_average_current": -32.300000000000004,
		"i_a_current": 0,
		"i_b_current": 0,
		"i_c_current": 0,
		"last_phase_voltage_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_power_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_energy_communication_time": "0001-01-01T00:00:00Z",
		"timeout":<PHONE_NUMBER>,
		"num_meters_aggregated": 2,
		"instant_total_current": -32.300000000000004
	},
	"load": {
		"last_communication_time": "2023-06-13T19:28:59.916289015-07:00",
		"instant_power": 1515,
		"instant_reactive_power": 373.5,
		"instant_apparent_power": 1560.3612562480523,
		"frequency": 0,
		"energy_exported": 0,
		"energy_imported": 20759944.854081012,
		"instant_average_voltage":<PHONE_NUMBER>9908302,
		"instant_average_current": 7.218963048919102,
		"i_a_current": 0,
		"i_b_current": 0,
		"i_c_current": 0,
		"last_phase_voltage_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_power_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_energy_communication_time": "0001-01-01T00:00:00Z",
		"timeout":<PHONE_NUMBER>,
		"instant_total_current": 7.218963048919102
	},
	"solar": {
		"last_communication_time": "2023-06-13T19:28:59.930135427-07:00",
		"instant_power": 120,
		"instant_reactive_power": -10,
		"instant_apparent_power":<PHONE_NUMBER>8792295,
		"frequency": 59.995999999999995,
		"energy_exported": 19907110,
		"energy_imported": 0,
		"instant_average_voltage": 241.9,
		"instant_average_current": 0.49586776859504134,
		"i_a_current": 0,
		"i_b_current": 0,
		"i_c_current": 0,
		"last_phase_voltage_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_power_communication_time": "0001-01-01T00:00:00Z",
		"last_phase_energy_communication_time": "0001-01-01T00:00:00Z",
		"timeout":<PHONE_NUMBER>,
		"num_meters_aggregated": 1,
		"instant_total_current": 0.49586776859504134
	}
}

OK. Something to dive into after this weekend.
The Power Flow animation does seem to use the CSV call to display its data. I might have to do a bit more experimenting with toggling on/off loads to see where the values show up.

I think I figured out the algorithm and it's actually pretty simple, and not totally accurate during solar production times, but good enough.
To recapitulate: One of my solar inverters is in a distribution panel that also has loads on it (mostly lighting). It has CTs both on the load side and on the solar side.
Here is what appears to be happening:
If the system is producing solar and the load is less than the total solar production then the load side looks negative and it is ignored. Note that any load reduces the value of the solar so it will be in error.
If the system is producing solar and the load is bigger than the solar then the solar goes negative and is ignored, and the load (home side) gets the remainder added to it. Again this is not totally accurate because the amount of solar being produced is the error. See pictures attached.
If there is no solar then the load side is accurate and is added to the home load. The solar will be negative and be ignored.
These pictures represent a seneario where there is 200 Watts of solar being generated with 300 Watts of load on the same panel.

This is the current Powerwall-Dashboard without the correction algorithms. Note the negative solar and the amount of home load.

This is the Tesla app version with Tesla's tweaking of the data on the back end. Note the solar is 0 and the home load is 100 Watts (300W load - 200W solar) higher than the PW Dashboard raw data view.

Hi @aesculus - From that description, it sounds like both CTs are configured as solar - one should be configured as solar and one as load (and is really something your installer should be sorting - solar should not be showing significant negative values. I'd be making it their problem to sort out).
The gateway is set up so each CT can be toggled according to what it is reading and the internals do the balancing for you.
(The more cynical view is that they may only have put in one CT and all you are seeing is the net output from that one CT - like @jasonacox says, I'd be digging deeper into the API to see what measurements you actually having coming into the gateway).

@BuongiornoTexas  - My setup is a bit weird. I have a solar system installed in a remote building. Both Tesla and I thought it was easiest just to monitor the panel vs the individual circuits since that would require two sets of very expensive  remote CTs to be 100% accurate for the rare case I have significant loads at the same time as I was producing solar. Right now the only significant loads (> 50 W) are at night when the sun is not shining and there is no solar, and even then it's about 300W.
So Tesla fixed this by having two sets of CTs on the same circuit basically. One is with the normal backup load CTs where the circuit is part of the bundle, and the other being a separate set only on that breaker that is tied into the solar set.
In the back end Tesla is doing some math to throw away the solar that is negative (the nighttime lighting on the solar breaker). And with the Tesla app, everything looks correct.
What I need to figure out is how they are dealing with the negative generation of solar that is tied into the site load. Since the API does not deal with CTs directly, but with the A/B phases of the combined site and solar CTs. I have a bit more investigation to do here. I need to figure out how they are not reducing my site load during solar production on that circuit.

Hi @aesculus - Fair enough - I'm struggling to picture this in my head. If you could provide a sketch of what is going on with your CTs, load and solar circuits, we might be able to provide more useful thoughts on your issue.
You can probably also get some useful info on how the CTs are configured by looking at these three pages.
http://pypowerwall.host:8675/api/meters/
http://pypowerwall.host:8675/api/meters/site
http://pypowerwall.host:8675/api/meters/solar
From these you should be able to see which CTs are assigned to site and solar and which are inverted - which is a software switch that corrects for CTs installed backwards for the expected current flow (we had a solar line which was reporting negative exports when the sun was shining - flipping this switch was a lot easier than shutting the house down for the sparky to reverse the CT!). Also from my comments, you should be getting a picture that you can't rely on Tesla and their installers to get things right first time - it took 3 post install visits/changes to get our system fully sorted out.
(Edit out your serial numbers/short ids if you post any data here).
Be warned that the transition from raw meter data to aggregate goes through a bit of Tesla massaging, so it may be hard to reconcile numbers.

@jasonacox I could use a bit of obvious information on where to place the server.py file in a Powerwall-Dashboard implementation.
I think I am ready to experiment with my modifications but don't see the server.py file in my current installation. There is one in the weather folder but I doubt that is the place to modify it?  Also what would I need to do to ensure this gets used to feed the PWDB? Is there a setting somewhere or just its presence?

@aesculus - I think you may be looking for pypowerwall.  https://github.com/jasonacox/pypowerwall. In particular, server.py in the proxy folder.

That is true but I have no clue how to integrate it into the Dashboard. So looking for a cheat sheet.

For development, here is what i do... You can create a script to run it on the host and pass in the environmentals.  First, you clone pypowerwall and move into the proxy directory:
git clone https://github.com/jasonacox/pypowerwall.git
cd pypowerwall/proxy

Edit server.py as needed... then start it up:
# Start up pypowerwall for testing
export PW_PASSWORD="password"
export PW_EMAIL="email"
export PW_HOST="x.x.x.x"
export PW_TIMEZONE="America/LosAngeles"
export PW_DEBUG="yes"
echo "Starting proxy at http://localhost:8675..."
python3 server.py

You should be able to see stats at: http://localhost:8675/stats values at http://localhost:8675/aggregates or the animation at http://localhost:8675/example.html
# Tests
curl -i http://localhost:8675/soe
curl -i http://localhost:8675/aggregates

Once it is working, you will need to create a container - see this doc: https://github.com/jasonacox/pypowerwall/tree/main/proxy#build-your-own
Key being:
# Build for local architecture
docker build -t pypowerwall:latest .

# Run it as a test
docker run \
-d \
-p 8675:8675 \
--name pypowerwall \
--restart unless-stopped \
pypowerwall

You will then need to modify the docker compose file (powerwall.yml) to use the docker version you just built (removing jasonacox and version). This is the section:
https://github.com/jasonacox/Powerwall-Dashboard/blob/18ff67bcb433eeaa00731c2d417bbe267202e4a8/powerwall.yml#L22-L33
I'm sorry... it's a bit complicated. There is also a strong change that I missed something or had a typo above. I'm traveling this week and unable to test.  Good luck!  And have fun... that's the whole point, right? 😉

Just what I needed. I will on it and report back when successful, or fail misserably.

If you are doing your development on the same machine as your main dashboard docker setup, you'll also want to change the port for your test server. Otherwise you'll have two services sitting on 8675.

Good point. I'll get it working as an alternative port first and then when all is OK, I will swap it.

@jasonacox OK. A bit dense here. Tried installing it with just copying various files. Failed when it could not import pypowerwall when running scan or other script.
Dropped back to using PIP to install and when running scan after it was OK. Looked at the folder where pip installed it and did not find anything different that what I manually copied (ie nothing to import).
So what am I missing here?
I also probably need to better understand pip too. I called it from my self made pypowerwall folder but in reality it put it deep into the users folder structure under python3.

Quick background: PIP is the way Python manages packages (libraries).  It stands for "Pip Installs Packages"(ha!) and uses the Python Package Index (PyPI). PyPI is a repository for software packages in the Python programming language. You use pip (command line) to install, upgrade, and manage Python packages from PyPI.
PyPowerwall is a python package (the source code of which is located in the pypowerwall folder inside the repo).   You can run it by cloning the package (as mentioned above) but you will need to run your code (updated server) that use that package from the root folder of that repo.  The import command will first look to see if you have the local files before looking at the pip libraries you have installed. I published pypowerwall on PyPI so most users will not need to clone the repo, they just need to run pip install pypowerwall.
For the Powerwall-Dashboard project, I have made it somewhat confusing by using a container named pypowerwall but this is NOT the same as the python package.  It is actually a bit of code (server.py) that provides a proxy server to a Powerwall that happens to use the python pypowerwall library. I bunded this proxy up into a docker container and stored it on DockerHub as pypowerwall instead of pypowerwall-proxy or something more definitiave (sorry).
For the purposes of this work you are doing, you will need both.  Install the package pip install pypowerwall and then git clone https://github.com/jasonacox/pypowerwall.git to download the example proxy server.py code so you can modify it.
# install python library
pip install pypowerwall

# install code that contains example server.py
git clone https://github.com/jasonacox/pypowerwall.git
cd pypowerwall/proxy

# Start up pypowerwall proxy server for testing
export PW_PASSWORD="password"
export PW_EMAIL="email"
export PW_HOST="x.x.x.x"
export PW_TIMEZONE="America/LosAngeles"
export PW_DEBUG="yes"
export PW_PORT="8999"
echo "Starting proxy at http://localhost:8999..."
python3 server.py

OK. Way out of my league and the QNAP support of Python3 is terrible at best.
I have run into this issue trying to start the proxy server:
Traceback (most recent call last):   File "/share/CACHEDEV1_DATA/pypowerwall/proxy/server.py", line 28, in <module>     from transform import get_static, inject_js   File "/share/CACHEDEV1_DATA/pypowerwall/proxy/transform.py", line 3, in <module>     from bs4 import BeautifulSoup as Soup ModuleNotFoundError: No module named 'bs4'

Welcome to the fun of python programming! 😁
You can install the bs4 module: pip install beautifulsoup4
FWIW, I find that ChatGPT can also help: https://chat.openai.com/share/53a0b68f-b8da-4b21-baef-e5f28b0b4270

Welcome to the fun of python programming! 😁
I only have so many slots for tech platforms. The dance card is already filled. And the problem is you cannot delete the old stuff like FORTRAN once you use it. :-)
You can install the bs4 module: pip install beautifulsoup4
FWIW, I find that ChatGPT can also help: https://chat.openai.com/share/53a0b68f-b8da-4b21-baef-e5f28b0b4270
OK. Installed. I am up and running on port 8999. Now for a few days of experimenting with different scenarios and then it will be off to create the new pypowerwall container. Stand by.

The dance card is already filled

🤣 Just keep dancing!

I am up and running on port 8999.

Great job!

@jasonacox Lets say I want to alter the value of the instant_power in the solar meter aggregates in server.py.
What would I modify in lines 132-133 before posting the message back in 134?
"solar": { 		"last_communication_time": "2023-06-13T19:28:59.930135427-07:00", 		"instant_power": 120,

To modify the JSON data and add 1000 (as an example) to the "solar" "instant_power" value in a Python script, you can use the json module to parse the JSON string, update the value, and then convert it back to a JSON string. Here's an example:
        if self.path == '/aggregates' or self.path == '/api/meters/aggregates':
            # Meters - JSON
            jsonpayload = pw.poll('/api/meters/aggregates')
            # Parse JSON string
            data = json.loads(jsonpayload)
            # Update the "instant_power" value in "solar"
            data["solar"]["instant_power"] += 1000
            # Convert back to JSON string
            message = json.dumps(data)

Thanks for the python lesson.

Thanks for the python lesson.

If you want to get into it, humble bundle routinely has very good introductory/mid level python book bundles for very low cost. I've collected 10-15 O'Reilly books over the years for almost nothing. They also have no starch press stuff, which has an excellent reputation as well.

No. I was actually being sarcastic.  While python is a great language, I am done learning new things. But thanks for the pointer anyway. I am sure someone following this thread in the future will gain from it.

@jasonacox Done with coding and checked it out OK. Made the pypowerwall docker image OK.
I also see I have a pypowerwall and two jasoncox/pypowerwall (0.6.2t26 and latest with same date and time) images in docker.
I see how to change the powerwall.yml.
So can I just stop and remove the standard pypowerwall container and then after changing the powerwall.yml rerun the ./setup.sh for my pypowerwall image to become the one the container is based on?
I suspect I don't have to delete the  jasoncox/pypowerwall images since they won't be installed after making the yml change?

You should only need to update the powerwall.yml to point to your local pypowerwall image you built:
    pypowerwall:
        image: pypowerwall
        container_name: pypowerwall
        hostname: pypowerwall
        restart: always
        user: "1000:1000"
        ports:
            - target: 8675
              published: 8675
              mode: host
        env_file:
            - pypowerwall.env

Then run:
./compose-dash.sh up -d

Ugh. I am back to that issue again with the DNS=[] rather than null again. I did not change that part of the yml and the standalone command
docker run -d -p 8675:8675 --name pypowerwall --restart unless-stopped pypowerwall
did not result in null either. Now I have to try to figure out why that is! Anything you can think might have forced the DNS [] thing when building the docker image?

Did we ever figure out why it didn't originally work here? https://github.com/jasonacox/Powerwall-Dashboard/issues/288. I looked though that issue again can't find where it was fixed.  Did it just work when you "started over"?
Perhaps a full restart of the stack?   ./compose-dash.sh down and ./compose-dash.sh up -d

The only thing I changed in the pypowerwall.yml was jasonacox/pypowerwall:0.6.2t26 > pypowerwall
And BTW after the full restart it has null rather than [] but still refuses to connect
I did an inspect on both the working and non working containers and the only thing that was different besides the obvious numbers and dates were:
"PYTHON_VERSION=3.10.12" where yours is "PYTHON_VERSION=3.10.11"
"Image": "pypowerwall" where yours is "Image": "jasonacox/pypowerwall:0.6.2t26"
"Gateway": "<IP_ADDRESS>" where yours is "Gateway": "<IP_ADDRESS>"
"IPAddress": "<IP_ADDRESS>" where yours is "IPAddress": "<IP_ADDRESS>"

Did you stop the old one?  Since they are using the same port, only one will be able to run. Also, check the logs. But, the network difference is interesting.  It is like the docker networking isn't set up right.  I would suggest removing the full stack including the docker networking and start over:
./compose-dash.sh down
./compose-dash.sh up -d

I did the full compose with down first. I will try log tomorrow.
Seems odd that pypowerwall gets the low ip address.
Chris Couper
On Mon, Jun 26, 2023, 9:45 PM Jason Cox @.***> wrote:

Did you stop the old one? Since they are using the same port, only one
will be able to run. Also, check the logs. But, the network difference is
interesting. It is like the docker networking isn't set up right. I would
suggest removing the full stack including the docker networking and start
over:
./compose-dash.sh down
./compose-dash.sh up -d
—
Reply to this email directly, view it on GitHub
https://github.com/jasonacox/Powerwall-Dashboard/issues/302#issuecomment-1608790542,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACFFZAAJ7LEOCTXRAAITBDXNJQQLANCNFSM6AAAAAAZDYOZPI
.
You are receiving this because you were mentioned.Message ID:
@.***>

Attached is the log. Seems to be a name resolution issue. Note there were no errors when creating the image in docker but perhaps my environment is not perfect.
This is running the container as a separate app.
py_log.txt
This was my 'major' code change.
           # Meters - JSON             # mod for negative loads on solar circuits             jsonpayload = pw.poll('/api/meters/aggregates')             # Parse JSON string             data = json.loads(jsonpayload)             # Update the "instant_power" value in "solar"             if data["solar"]["instant_power"] < 0:                 data["solar"]["instant_power"] = 0             # Convert back to JSON string             message = json.dumps(data)             # message = pw.poll('/api/meters/aggregates')

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='hostname', port=443): Max retries exceeded with url: / (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x7f47e7990070>: Failed to resolve 'hostname' ([Errno -2] Name does not resolve)"))

This is curious. It is like the Environmental variables are not loading, specifically PW_HOST, which is causing the name lookup issue.  The file pypowerwall.env should contain something like:
<EMAIL_ADDRESS>PW_PASSWORD=password
PW_HOST=<IP_ADDRESS>
PW_TIMEZONE=America/Los_Angeles
PW_DEBUG=no

And that should be set via docker-compose in the yaml file:
        env_file:
            - pypowerwall.env

but it appears that it is not loading for some reason in you configuration.   Can you check that the pypowerwall.env looks right and is the same folder where you run the ./compose-dash.sh up -d?

Yeah. I literally run the standard version of containers from my powerwall.yml and then all I do is to change this:
pypowerwall:
image: pypowerwall
So from the same folder and all other files are untouched.
I can flip flop from working to not working just by making that change from the standard pypowerwall image.
I can only think it's something in my docker build environment. BTW I tried it with a virgin server.py file and its the same host issue.

I tend to agree. It is very odd.   That did it. Working now.
Now I have to fix my logic. I cannot just set the solar value to 0 but have to add whatever the value was to the load side, otherwise it no longer balances. I am assuming this is because the aggregate is after the math to figure out the load.
Is there a API call to adjust the solar before aggregate does its math, or should I just take from solar and give to load?

You will need to do the math. The APIs just pull from what the Powerwall is reporting. We can't adjust its math.
Where does the 300W come from and can we get that data from any of the API calls?   Or do you mean that any negative amount in Solar should be added to the load?
            # Meters - JSON
            # mod for negative loads on solar circuits
            jsonpayload = pw.poll('/api/meters/aggregates')
            # Parse JSON string
            data = json.loads(jsonpayload)
            # Update the "instant_power" value in "solar" and "load"
            if data["solar"]["instant_power"] < 0:
                data["load"]["instant_power"] += abs(data["solar"]["instant_power"])
                data["solar"]["instant_power"] = 0
            # Convert back to JSON string
            message = json.dumps(data)
            # message = pw.poll('/api/meters/aggregates')

BTW I think this statement fixed the problem but I even tried deleting the image before too and it did not make any difference.
docker images | grep pypowerwall | awk '{print $3}' | xargs docker rmi -f

Working fine so closing this thread. Thanks for the help.


Submission of my tutorial for the Cookbook Jam 3

Hopefully everything was done right :)

Hey! Been taking a gander at this, and I gotta say, it's pretty well done. :)
I do wanna give a couple of my own notes into this however, particularly on methods.

I've noticed that you've defined your methods outside of the create event in your tutorial. Which I can understand the reasoning for it, and the effects on it aren't super drastic for a tutorial, it can have a slight impact on performance as it's effectively making a new method on every frame. So I think at minimal, it's something to keep in mind in terms of code structure.

I would also suggest outright avoiding using the script function syntax anywhere that would be presumably an instance variable. As GameMaker does technically make it global (it's not the case entirely right now as it's a bug, and won't appear til 2024.10 https://github.com/YoYoGames/GameMaker-Bugs/issues/7125. Ultimately, the syntax itself should be Jump = function() {} for methods, and function Jump() {} for functions.

I don't mind 1 so much, but I'd recommend at least adjusting 2 as 2 could have some other dire consequences if someone wants to define more than one Jump method for their instances.

Hey! Been taking a gander at this, and I gotta say, it's pretty well done. :)
I do wanna give a couple of my own notes into this however, particularly on methods.

I've noticed that you've defined your methods outside of the create event in your tutorial. Which I can understand the reasoning for it, and the effects on it aren't super drastic for a tutorial, it can have a slight impact on performance as it's effectively making a new method on every frame. So I think at minimal, it's something to keep in mind in terms of code structure.

I would also suggest outright avoiding using the script function syntax anywhere that would be presumably an instance variable. As GameMaker does technically make it global (it's not the case entirely right now as it's a bug, and won't appear til 2024.10 https://github.com/YoYoGames/GameMaker-Bugs/issues/7125. Ultimately, the syntax itself should be Jump = function() {} for methods, and function Jump() {} for functions.

I don't mind 1 so much, but I'd recommend at least correcting 2, as it could have some other dire consequences if someone wants to define more than one Jump method for their instances. I'll leave this open in the meantime so you can have a chance to correct it.
Other than that, this is looking pretty good overall. Very informative. Well done! :)

I reckon it's better now, thanks for the input 👍

Looking good 😎


sap.ui.core.format.DateFormat: Error parsing 'wwww' format

OpenUI5 version: latest
Browser/version (+device/version): Any
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible): https://jsbin.com/sazuweh/edit?html,js,output
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:

Open up calendar picker dialog in sample
Select any date (e.g. today)
Note that input field now says something like 'week Calendar Week 45 of 2018'
Edit field to change the day (e.g. make it 44 instead of 45)
Press tab to submit change
Note that the input field reverts back to placeholder text ('week' wwww 'of' YYYY)

What is the expected result? Expected that the date value can be edited within the input field, as it can with other formats.
What happens instead? An error is shown in the browser console (The given date instance isn't valid.) and the date value is removed.
Any other information? (attach screenshot if possible) The problem is in sap.ui.core.format.DateFormat.oSymbols.  In this object there is a "w" object for "weekInYear".  Within this "weekInYear" there is a parse function.  In this parse function an oResult variable is set by using a regular expression to find the week number.  In this case the oResult is a week number string value of "Calendar Week 45".  The routine then tries to set iWeek by calling parseInt() on oResult.  It fails because it can't parse "Calendar Week 45" as an integer.  As a result, the parse will fail with the message "The given date instance isn't valid" as can be seen in the dev console.
It seems a check needs to be made to extract the week number from the string and then call parseInt() on that value.  We tried doing the following and it fixed the parse failure:
sPart = oFormat.oLocaleData.getCalendarWeek(oPart.digits === 3 ? "narrow" : "wide");
sPart = sPart.replace("{0}", "[0-9]+");
var rWeekNumber = new RegExp(sPart),
oResult = rWeekNumber.exec(sValue);
if (oResult) {
iLength = oResult[0].length;
if (iLength > 2) {
var rWeekDigits = /\d+/;
iWeek = parseInt(oResult[0].match(rWeekDigits), 10) - 1;
} else {
iWeek = parseInt(oResult[0], 10) - 1;
}
} else {
bValid = oParseHelper.checkValid(oPart.type, true, oFormat);
}

Hello @cmastrandrea ,
Thank you for sharing this finding. I've created an internal incident<PHONE_NUMBER>. The status of the issue will be updated here in GitHub.
Regards, Diana

Hello @cmastrandrea,
thanks for reporting this issue.  "WWW" and "WWWW" are special patterns we added for standalone usage - there is no point to use them in a week/year format, please use "yyyyWW" instead. Alternatively please use a pattern instead of format like "WWWW, yyyy".
Regards,
Malte


🐛 [BUG:] Fixed warnings and a11y issues

added alt-text to images (wherever necessary)
fixed target='_blank' vulnerability,
fixed react useEffect() dependencies missing warnings and tested with the socket server✔
other minor fixes.

PS: there might be some extra whitespace added in lines because of a different document formatter. (this won't affect the working of code)

Hey @kothariji kindly review this PR associated with issue #78

LGTM🔥

@amaan-ahmad
Build is failing, here is the error message. Please rectify it.

@kothariji  that was caused due to conflict with another commit feature of 'someone is typing...',
I resolved it now.

Hey @kothariji , do let me know if there are further changes or we are good to merge ✌🙌

Hey @kothariji , do let me know if there are further changes or we are good to merge ✌🙌

Yes we are reviewing it, and once done, we'll let you know. 🙌

hey @kothariji
Yes, I found this error hence adding props and socket to the dependency array wasn't a fruitful decision at my end, hence I am reverting it. However other securities and a11y warnings have been fixed now in the latest commit. Kindly check, waiting for feedback.
And thanks for patiently providing a review. 😊🙌
Best regards.


What was the loss values for the pertained models?

I am training my own model and I was just curious what the expected final loss value is. I seem to be stagnating around 2.08 loss using all the default parameters.

I have the same problem. I'm training on 16k-LP7 dataset, the loss is converging at 2.7, which is very high to me.


Error in initial test run: "undefinedTypeScript diagnostics"

Summary
stryker run generates errors from TypeScript diagnostics that wouldn't otherwise show up in vue-cli or jest. The type definitions are from the vue project, and from what I can tell it doesn't seem possible that there are any type errors.
It's a Vue project and it can be seen at:

https://github.com/awerlang/sourdough/commit/fd309eb24e396e89ea8f22b350839d680e7fc400
The parent commit reproduces the error

Alternatives to fix the issue:

Disable diagnostics in ts-jest for stryker;
Disable diagnostics in ts-jest for jest (although it doesn't manifest in jest);
Disable strict checking in tsconfig.json (not a solution, and it doesn't fix the readonly assignment error);
disableTypeChecks: ["**/*.{ts,vue}"] in stryker.conf.js (I noticed the default configuration would exclude the tests directory.)

Awesome project btw. Let me know if there's anything more I could do to help fix the issue.
Stryker config
{
  _comment:
    "This config was generated using a preset. Please see the handbook for more information: https://github.com/stryker-mutator/stryker-handbook/blob/master/stryker/guides/vuejs.md#vuejs",
  mutate: [
    "src/**/*.{ts,vue}"
  ],
  testRunner: "jest",
  mutator: {
    plugins: []
  },
  jest: {},
  reporters: ["progress", "clear-text", "html"],
  coverageAnalysis: "off"
}

Test runner config
module.exports = {
  preset: "@vue/cli-plugin-unit-jest/presets/typescript",
  transform: {
    "^.+\\.vue$": "vue-jest"
  }
};

Stryker environment
├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>├─┬<EMAIL_ADDRESS>

├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ ├─┬<EMAIL_ADDRESS>│ │ ├─┬<EMAIL_ADDRESS>└─┬<EMAIL_ADDRESS>

Test runner environment

jest

Your Environment

software
version(s)

node
v12.18.2

npm
6.14.5

Operating System
Linux

Add stryker.log
21:03:20 (6293) INFO ConfigReader Using stryker.conf.js
21:03:20 (6293) INFO InputFileResolver Found 1 of 43 file(s) to be mutated.
21:03:21 (6293) INFO Instrumenter Instrumented 1 source file(s) with 6 mutant(s)
21:03:21 (6293) INFO ConcurrencyTokenProvider Creating 7 test runner process(es).
21:03:21 (6293) INFO DryRunExecutor Starting initial test run. This may take a while.
21:03:24 (6293) ERROR DryRunExecutor One or more tests resulted in an error:
        undefinedTypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option):
tests/unit/composables/useModelValue.spec.ts:15:10 - error TS2532: Object is possibly 'undefined'.

15   expect(comp.value.value).toBe(1000);
            ~~~~
tests/unit/composables/useModelValue.spec.ts:15:10 - error TS2532: Object is possibly 'undefined'.

15   expect(comp.value.value).toBe(1000);
            ~~~~~~~~~~
tests/unit/composables/useModelValue.spec.ts:22:3 - error TS2532: Object is possibly 'undefined'.

22   comp.value.value = 500;
     ~~~~
tests/unit/composables/useModelValue.spec.ts:22:3 - error TS2532: Object is possibly 'undefined'.

22   comp.value.value = 500;
     ~~~~~~~~~~
tests/unit/composables/useModelValue.spec.ts:22:14 - error TS2540: Cannot assign to 'value' because it is a read-only property.

22   comp.value.value = 500;
                ~~~~~
21:03:24 (6293) ERROR Stryker Error: Something went wrong in the initial test run
    at DryRunExecutor.validateResultCompleted (/src/sourdough/node_modules/@stryker-mutator/core/src/process/3-DryRunExecutor.js:64:15)
    at DryRunExecutor.timeDryRun (/src/sourdough/node_modules/@stryker-mutator/core/src/process/3-DryRunExecutor.js:72:14)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async DryRunExecutor.execute (/src/sourdough/node_modules/@stryker-mutator/core/src/process/3-DryRunExecutor.js:37:42)
    at async Stryker.runMutationTest (/src/sourdough/node_modules/@stryker-mutator/core/src/Stryker.js:36:53)

Thanks for the extensive bug report and praise 😊

I noticed the default configuration would exclude the tests directory.

I think this is an oversight. The default is to ignore type checks in lib, src and test directory. However, I've noticed that some people are using tests as a convention.

Let me know if there's anything more I could do to help fix the issue.

Sure 😅
https://github.com/stryker-mutator/stryker/blob/c593f74ee1446875a6993eb0fe2b6e05828ca255/packages/api/schema/stryker-core.json#L364
Adding the tests directory here should do the trick.


Deposit Command: /deposit [all] [amount]

Content:

"Reworked" the deposit command.

deposit now just deposits the items in your hand.
deposit all [int: amount] has the old behavior, but can also be capped by amount

Added a config option for currency pre- & suffix. Only used it deposit command in this commit

Discussion
When you have multiple currency items configured, but only want to deposit a specifc or not all of them, you would have to clear your inventory first. With the hand feature, you can easily control what you deposit.
Maybe you could swap the command structure: deposit stays the same and the hand feature move to
deposit hand

Hey,
I added some feature on my personal fork. Some might also work for the main repo. So I'm testing the water here.
If you like the ideas I have, I would add some more PRs.
Open to discussion/changes/feedback :)

Deposit only certain currency matches  region

@Ranchosm335 sorry, I don’t get what you mean. What region ?

https://jekyllrb.com/docs/configuration/front-matter-defaults/

{
"name": "BTC.main",
"height": 865493,
"hash": "0000000000000000000143a112c5ab741ec6e95b6c80f9834199efe2154c972b",
"time": "2024-10-13T16:25:49.713998704Z",
"latest_url": "https://api.blockcypher.com/v1/btc/main/blocks/0000000000000000000143a112c5ab741ec6e95b6c80f9834199efe2154c972b",
"previous_hash": "000000000000000000019ebb16c408aa943419a77bdab3942da4b17520fc9dae",
"previous_url": "https://api.blockcypher.com/v1/btc/main/blocks/000000000000000000019ebb16c408aa943419a77bdab3942da4b17520fc9dae",
"peer_count": 324,
"unconfirmed_count": 26112,
"high_fee_per_kb": 28089,
"medium_fee_per_kb": 13721,
"low_fee_per_kb": 7758,
"last_fork_height": 863888,
"last_fork_hash": "000000000000000000022336ca639c1483ce4bfc33f07909659c1be89d133238"
}


Show exercise spaced repetition item quality

It turns out this is more difficult than I thought. In the Supermemo-2 algorithm, the E-factor roughly corresponds to difficulty. However, if the user enters a quality less than 3, the E-factor doesn't change at all! Instead, the item is given the most frequent review schedule. So it's not a direct measure of difficulty, but instead is just used to decide how to schedule the item. Consequently, I wasn't able to produce a reliable difficulty metric to display.


Fix DOI manage command

Purpose

Changes

QA Notes
Please make verification statements inspired by your code and what your code touches.

Verify
Verify

What are the areas of risk?
Any concerns/considerations/questions that development raised?
Documentation

Side Effects

Ticket

Cherry-squashed as 394623ae2279207667df7e0c099f6d514eed767c, consider this merged. :octocat:


Add this comment and update+do pattern to all CI examples?

What is the issue?
Should we add this comment and update+do pattern to all CI examples as a best practice until more package/dependency management changes land?
https://github.com/dagger/dagger/blob/main/.github/workflows/todoapp.yml#L75-L78

Duplicate of #2315
I know that came later but it has more content.


Memory overflow in Swift, exceeding the size limit of 12MB.

How frequently does the bug occur?
Always
Description
func getData() -> Results<Phone> {
    let items = sharedRealmDB(dbFile: "db.realm").objects(Phone.self).sorted(by: \.phone, ascending: true)
    return items
}

private func addOrRemoveIncrementalBlockingPhoneNumbers(to context: CXCallDirectoryExtensionContext) {
    // Retrieve any changes to the set of phone numbers to block from data store. For optimal performance and memory usage when there are many phone numbers,
    // consider only loading a subset of numbers at a given time and using autorelease pool(s) to release objects allocated during each batch of numbers which are loaded.

    let phoneData = getData()
    print(phoneData)
}

I am using the CallKit -> CallDirectoryHandler to read data.

How to solve it? Is there a feature of offset and limit?
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
CallKit -> CallDirectoryHandler can be called to reproduce.
Version
v10.46.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS
Build environment
Xcode version: ...
Dependency manager and version: ...

You say this reproduces consistently for you - does it happen on the simulator or a physical device? Also, do you have a simple project you can upload that we can use to reproduce it locally?

The report here is a bit unclear.
The first screenshots of code reads in the Realm objects in a lazy-loading fashion; e.g. there could be 50,000 objects and that really impact memory. However, that code isn't used anywhere else.
The screenshot with the BaseDescriptor object in it doesn't appear to be related to Realm, and then the calling code calls a function getPhoneRulesData which appears to be unrelated the rest of the code.
Can you edit and focus the question on the issues with Realm and include a duplicatable example? If the issue is with CallKit this would not be correct forum.


fixed table column width. How?

Can anyone tell me how to give fixed table column width.
I have five columns. I want like 30%,20%,10%,30%,10%  Can anyone help me? Thanks

      Col 1
      Col 2
      Col 3
      Col 4
      Col 5

      Val 1
      Val 2
      Val 3
      Val 4
      Val 5

@jasny Thanks.. Its working. But i still have problem. Its not working when i have lengthy text in the cell. Is there a way to hide the overflow text?.I tried overflow:hidden; But its not working.

@jasny  Thanks once again. I added style="table-layout: fixed;" and applied  overflow:hidden; in the td. Now its working. :)
Thanks

@Viruthagiri I've changed the example. Have a look.
@fat This isn't really an issue, please close it.

Thanks

thanks for the help @jasny!


Dropdown component with search feature

Prerequisites

[X] I have searched for duplicate or closed feature requests
[X] I have read the contributing guidelines

Proposal
Hi @julien-deramond
I'm coming back to news about that component as I remind (cf.  #943 and #1123) that you were working on that kind of component but was not yet available in v5.2.
Do you have some news if it could be released in future version ?
If not, i'm fearing that we will have to do a custom development as we need more and more that kind of component (for enhancing customer experience regarding long list of districts for example, for selecting a country, etc.).
Thanks for your feedback
Motivation and context
We are actually needing this dropdown for several type of contexts in use of MEA portals notably (but not only).
For example : in roaming, rather than having a long list (not very suitable in mobile), we would like to enhance the customer experience by permitting him to type the first letter of a country and easily selecting it
Another example is in eShop funnel where user should select his district in a long list of districts proposed.
There are also examples depending context and country needs.

Do you have some news if it could be released in future version ?

We haven't planned yet the future components to embed into Boosted. It's one of the components we'd like to continue working on now that the dark mode is released. More information will come in #943 or the corresponding PR when it is started.

If not, i'm fearing that we will have to do a custom development as we need more and more that kind of component (for enhancing customer experience regarding long list of districts for example, for selecting a country, etc.).

You have maybe some starting points in the #943 discussion as we prototyped some stuff in the past. Apparently, you'll start the development before us, so if you manage to do something, please don't hesitate to share it in #943. Even if it's not directly reusable, it could help.
I'm going to close this issue as duplicate and mention it in #943 as a reference for your need. #943 is already tagged as "asked by community" for priority management on our side.


Homebrew

Add docs for Homebrew Cask download.
Conversation/instructions: https://twitter.com/freekmurze/status/1347552395627278336

Thanks!

Thanks!


rename enums to lowerCamelCase

Follow the Swift 3.0 naming convention for enums.

Change:

Make all enum cases lowercase.
Add Target method to Target.Dependency because it's used in Manifest files, we don't make  breaking changes.

public static func Target(name: String) -> Dependency {
  return .target(name: name)
}

Left  case Init(InitMode) as UpperCase. It has conflicts with init method
use ``  for  case `static`

Thanks!
I hit a couple build errors though:
swiftpm/Package.swift:109:56: error: type 'ProductType' has no member 'Library'
let dylib = Product(name: "PackageDescription", type: .Library(.Dynamic), modules: "PackageDescription")
                                                       ^~~~~~~

We shouldn't "just rename" PackageDescription yet, this will break packages. Let's put that in a separate PR and discuss how we can mitigate the impact on users.
Another failure I hit:
swiftpm/Sources/Utility/File.swift:29:23: error: type 'Error' has no member 'CouldNotCreateFile'
                throw Error.CouldNotCreateFile(path: path)
                      ^~~~~ ~~~~~~~~~~~~~~~~~~

@dabrahams 👍. I've reverted changes in PackageDescription and fixed these 2 issue that you mentioned.

@ddunbar You can use this pattern:
enum TheEnum {
  case foo

  @available(*, deprecated, renamed: "foo")
  static var Foo: TheEnum { return .foo }
}

func acceptsTheEnum(_: TheEnum) {}
acceptsTheEnum(.foo)
acceptsTheEnum(.Foo)

Thanks @gribozavr!


Build

Merging build to main: Contact form + email completed

Accepting pull request of Contact Form + Email


Update tutorial

A user reported in the Slack channel having issues installing the project.
@allcaps noticed that the manage.py won't work if there is no publisher defined.
I rearranged the tutorial steps.

Codecov Report

Merging #124 (f09cb33) into main (3395f47) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #124   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           40        40
  Lines         1072      1091   +19
  Branches        98       103    +5
=========================================
+ Hits          1072      1091   +19

Impacted Files
Coverage Δ

src/wagtail_live/blocks.py
100.00% <100.00%> (ø)

src/wagtail_live/models.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


⚠ Bofrost.at has degraded performance

In 681d1ed, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2242 ms

Resolved: Bofrost.at performance has improved in 2952348 after 1 hour, 31 minutes.


Cardboard button crashes VRView in WebView for pano image

I have set up a VRView in a WebView in an Android app to view a panoramic image.  It works ok until I press the cardboard button when I get the following errors.  The fullscreen button also does nothing (but doesn't cause a crash)
E/ACodec: [OMX.qcom.video.decoder.avc] configureCodec returning error -1010
E/ACodec: signalError(omxError 0x80001001, internalError -1010)
E/MediaCodec: Codec reported err 0xfffffc0e, actionCode 0, while in state 3
E/MediaCodec: configure failed with err 0xfffffc0e, resetting...
I/OMXClient: MuxOMX ctor
E/cr_media: Cannot configure the video codec
            android.media.MediaCodec$CodecException: Error 0xfffffc0e
                at android.media.MediaCodec.native_configure(Native Method)
                at android.media.MediaCodec.configure(MediaCodec.java:1882)
                at org.chromium.media.MediaCodecBridge.configureVideo(MediaCodecBridge.java:492)
W/cr_media: calling MediaCodec.release() on OMX.qcom.video.decoder.avc
E/chromium: [ERROR:render_media_log.cc(25)] MediaEvent: PIPELINE_ERROR decoder: not supported
I/chromium: [INFO:CONSOLE(0)] "Uncaught (in promise) NotSupportedError: Failed to load because no supported source was found."

I'm getting this error as well, but the app crashes for me whenever I click the fullscreen button too.

Do you see the same problems in Chrome? If so, please make sure usage stats are enabled and provide the crash ID from chrome://crashes.
Does that entire log only occur after the cardboard button is pressed? What is the cardboard button supposed to do? Is there a reason it would cause a (H.264) video playback?

I can use the examples on Chrome on the same device and they work.  So I think it must be something to do with VRView embedded in WebView.  I create the webview in my android activity (it is the only control) in xml:
<?xml version="1.0" encoding="utf-8"?> <WebView xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/webView"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:padding="0dip"     />
and then in code onCreate
`        webView = (WebView) findViewById(R.id.webView);
webView.setWebChromeClient(new MyWebChromeClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webView.getSettings().setAllowFileAccessFromFileURLs(true);
webView.getSettings().setAllowUniversalAccessFromFileURLs(true);
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setSupportZoom(true);
    webView.setWebViewClient(new WebViewClient() {
        @Override
        public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {
            Log.d(TAG,"Error " + request.toString() + " " + error.getDescription());
        }
    });

    webView.loadUrl("file:///android_asset/index.html");

`

I have fixed this issue by implementing a WebChromeClient with onShowCustomView and onHideCustomView for the enclosing WebView.  Now the full screen button and cardboard button both work as expected without crashing.
So possibly this error message is coming from a failure to have a custom view at full screen size in the display tree (but it is difficult to get that from the log).

Hi @zappyad can you please provide me some more info about how you implemented onShowCustomView and onHideCustomView?
Thank you very much

@zappyad i've encountered this issue and i would be happy to see how you solved it. There is no other reference to resolving this issue in internet


Refactor Temporal Explorer

Allow Temporal Explorer to spin up multiple workers. Only runs workers upon runWorker call, not upon initialization/this.explore().

Oops meant to go to my fork, please ignore


Refactor for compatibility with Rust 1.14

I was happy to find this library, having struggled to write something similar but much worse, so thanks for this!
The changes in this PR are:

deriving is now derive
TypeId has moved to std::any
The HashMap Entry API is improved, more succinct
Have to import traits you reference now (e.g. std::ops::Index)
.index doesn't take a reference to an index now
Removed feature phase stuff, which I think is obsolete now

Sorry for noticing this a bit late. Thanks for the pull request! I'd also recommend checking out https://github.com/slide-rs/specs given it is a lot more recently maintained. :)


update everyday choice task

currently, the everyday choice task has N pairs for the choice phase. These pairs are created by:
A, B, C, D
[ { A, B }, { B. C }, { C, D }, { D, A } ]
We want to create 2N pairs:
A, B, C, D
[ { A, B }, { B. C }, { C, D }, { D, A }, { A, C }, { B, D }, { C, A }, { D, B } ]

We need to add a variable to distinguish between the different types of trials
we need to ensure that the second N pairs that are generated are separated by the first N pairs


[HOLD for #52428] mweb -Expense - Via QAB, entering amount& tapping submit expense displays only currency

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

Version Number: 9. 0.62-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Action Performed:

Go to https://staging.new.expensify.com/home
Open a Workspace chat
Create an expense
Go to LHN
Tap fab and select submit expense via QAB
Enter amount
Tap submit expense
Note after tapping submit expense, user can see both currency and amount
Open a 1:1 chat with any user
Create an expense
Go to LHN
Tap fab and select submit expense via QAB
Enter amount
Tap submit expense
Note after tapping submit expense, user can see only currency

Expected Result:
Via QAB, entering amount& tapping submit expense must displays both currency and amount.
Actual Result:
Via QAB, entering amount& tapping submit expense displays only currency
Workaround:
Unknown
Platforms:

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

[ ] Android: Standalone
[ ] Android: HybridApp
[x] Android: mWeb Chrome
[ ] iOS: Standalone
[ ] iOS: HybridApp
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/7bd2e411-d470-48b8-91f8-9b2eb31bc47e
View all open jobs on GitHub

This can also be fixed in https://github.com/Expensify/App/pull/52428

Thanks @FitseTLT! Popping on hold until https://github.com/Expensify/App/pull/52428 is deployed.

Not reproducible now.
Build 9.0.64-0
https://github.com/user-attachments/assets/4dd221a8-899c-4b75-b9b2-9914138b7ceb


hard to understand reverse logs

I am on version 2.5.0. I noticed that logs are being reversed in this version. Can this be a setting at application leval because I can't make sense of the object I logged in reverse. take a look at this.

It is hard to understand the printed object when it is in reverse.
If we can put a switch in configuration on whether to reverse log or not then I think it would be nice to have.
It is not troubling, It is doing this it's job but this is something nice to have. Currently I am sshing into the server and seeing the logs using docker logs command

after upgrading to 2.5.0, I agree reverse logging is not an understandable option as it makes things much harder to read and understand. at least make this an optional change for people.

Yeah, it was a good idea in the first place, but it could be hard to read for sure. I'll revert it in the next version.

Closed by #369


Image-to-Image

It depends on this PR https://github.com/huggingface/api-inference-community/pull/223
        Args:
            inputs (:obj:`str`):
                a string containing some text
            image (:obj:`PIL.Image.Image`):
                a condition image
        Return:
            A :obj:`PIL.Image.Image` with the raw image representation as PIL.

{"inputs": {
    image: base64image,
    text: "",
}}

It is like the pose/controlnet models, an image as a pose, a text of what we want generated, and the output is the input image adapted to fit the text?

https://huggingface.co/tasks/image-to-image
It seems some of those models do not have text input, only image to image :thinking:
Can you clarify what it does? Should we use the same imageToImage task for both, or call it imageToImageGuided instead?

Internal Slack discussion - https://huggingface.slack.com/archives/C016D661PAN/p1680600898941279?thread_ts=1680599959.804889&cid=C016D661PAN

In short we have the following type of models in diffusers:

Image2Image (Stable Diffusion Image2Image, ControlNet, Instruct Pix2Pix, Stable UnCLIP) - all these models have "images" as the main input, called "data-stream" and are additionally conditioned on text "condition-stream". => All those models can in theory very well run without text, but just setting the text prompt to: text="" . That's what we currently do here: https://github.com/huggingface/api-inference-community/blob/30bf83aef8767406d16a7eb602bc63c8decdf692/docker_images/diffusers/app/pipelines/image_to_image.py#L75 . For ControlNet, there are actually lots of use cases where this makes sense to just provide an image, but for Pix2Pix and SD it  doesn't make too much sense => So for this type it would be great to always have a text and image widget
Image Variation (Stable Diff Image variation) - this is one of the very few pipelines that only accepts an image widget where we would have to force the text widget to be empty. However this model isn't really used that much.


Test Vimfm

Vimfm seems like a powerful tool and I should like it better than dolphing (though I'll probably still have dolphin installed just in case)
https://vifm.info/#:~:text=[Vifm](https://vifm.info/#:~:text=Vifm is a file manager with curses interface, which provides) is a file manager with curses interface, which provides

https://vifm.info/cheatsheets.shtml

just going to use dolphin. I like using a visual file editor. if Anything i'll use Midnight commander and rebind the hotkeys to be vim motions. Other than that I just use cli built ins


[Godot 3.0] Editor issue when losing and gaining focus

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Windows 10. Godot 3.0 29db531fc8360b1e6d5e23008b208517b6d8c627
Issue description:

While editing a tilemap, tabbing out godot and clicking to gain focus 2 tiles will be drawn

Changed the title of the issue because it affects the whole editor. I've tracked it down to this PR https://github.com/godotengine/godot/pull/7162

CC @iboshkov.

Can anyone check this one?

Hi, so seems like I missed this issue somehow, and only just now noticed the notification in my inbox, I don't have a Windows machine right now available to me, but I'm going to try to reproduce this hopefully this week, looking through the pull request I didn't spot what could be causing this issue. Has anyone tried it on a non-Windows platform ?

I have the bug on linux (X11 and i3-wm w/ focus_follows_mouse set to no)

@mrcdk you mention alt-Tab? has it got anything to do with it? Or is it just gaining focus by clicking?

Is this really an issue?
It seems like every app I can think about has the same behaviour as Godot.

I can't reproduce it on Linux. Is this still reproducible on Windows?

It's still reproducible and got even worse, see #34003

Closing in favor of #24970, which is more up-to-date.


Support 'createBond' and 'removeBond' for Android

Hi. First of all, thank you very much for your contribution. Since I found no features about Bluetooth binding and unbinding, I added related features.
createBond:
device.connect(isBond: true)

removeBond:
device.disconnect(isRemoveBond: true)

TKS

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.leo.lu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Frontend Dockerfile - first iteration

⚠ Before submitting the PR, make sure:

You asked someone to review it
You chose a meaningful title
You ran the tests

Keep in mind tests are also automatically ran in every PR, and you should never merge a PR that has failed tests.

Description of the PR
Testing instructions
What to test? How to do it?
Tracking
Link to the task(s), if any

thanks for the feedback and the clarification call. Based on it, I made a few additional changes:

I pinned the transifex CLI version, as opposed to loading from "master", which is evil
I did away with the file that holds the transifex API key, and instead am using an env var, which is documented, and overall a saner approach.


Convert from / to Dask types

Hi, I'm searching for a good way to convert from PySpark dataframes to lazy Dask dataframes.
Does Koalas support this type of conversion?

Nope, Koalas does not support and not plan Dask conversion


Plugin Toggle Button Is Dark In Color

Tidal Ver 2.36.2
Newest Tidal update made just the plugins enable button go from white to black making a little hard to see .

Working on it 👍🏻

This should be fixed in the latest version.


Ability to designate colors to folders and files, like post-it tabs

Description of the new feature / enhancement
I often am working on multiple projects in several statuses of work. On other OS's that I have used, they give the option to right click a folder or file and apply a color tab to it. I would often use this to help me quickly determine and organize project states. Ideally, the user could search based on these colored folders by color.
When you then have the window of that folder open, that file explorer window would be be highlighted with that color, so it would be easy to find if one has too many windows open.
Scenario when this would be used?
The scenarios I would use this in would be, quite honestly, in every day work. I am often jumping from project to project for bug fixes or feature requests and to have a quick visual on where I left off a project before moving on to another would save me time in trying to remember what I was working on three hours ago.
Mind you, for me I would use them as status sorting, but they could be use in all sorts of ways for different users. Maybe to assign certain colors to specific clients when files are not kept together, or if one has multiple project folders for one client, they could all be assigned to a color as determined by the user.
I have also seen it used for people to organize files by fiscal quarters, or months. The possibilities are endless as it would be a feature that each individual user would optimize and customize for themself.
Supporting information
This request is heavily based off my previous experience with the MacOS and how they allow you to apply colors to folders/files to help with organization and also for searching feature. The way it is implemented on their is a bit like a blog post's tags. It allows easier searching and quick identification of content, per the user's individual need for the system.

good idea, /dup #https://github.com/microsoft/PowerToys/issues/6157

/dup https://github.com/microsoft/PowerToys/issues/6157