support CHAP frames

Support to add and parse CHAP frames according to https://id3.org/id3v2-chapters-1.0 .
Similar PullRequest already opened (https://github.com/bogem/id3v2/pull/40), but it looks like doesn't proceed.
I respect it's commit and update in this PullRequest.

@bogem Hello, could you review this PR?

@bogem Hello, could you review this PR?

Just passing by; excellent work on this!

@bogem Hello, I added commit. Could you review again?

Also one important thing: did you test the MP3 file with written CHAPs via id3v2 in a major media player (e.g. Apple Music, WinAmp)? Does a player recognise such CHAPs? If yes, please send me a screenshot 🙏

@bogem I'm so sorry for late, I added commits for your comment. And I added results of test chapters written by id3v2 package:

Also one important thing: did you test the MP3 file with written CHAPs via id3v2 in a major media player (e.g. Apple Music, WinAmp)? Does a player recognise such CHAPs? If yes, please send me a screenshot 🙏

I tried test in a Apple Music or QuickTime Player, but they may not support chapters. I don't know major player supports chapter, so I tested by 2 software ( Forecast and  IINA ).
First, I wrote chapters to test.mp3 by following code:

Code to write 3 chapters to copied file from testdata/test.mp3
package main

import (
	"fmt"
	"github.com/bogem/id3v2"
	"os"
	"time"
)

func main() {
	if err := _main(); err != nil {
		fmt.Errorf(err.Error())
		os.Exit(1)
	}
}

func _main() error {
	fmt.Println("AAA")

	f, err := os.Open("./test_copied.mp3")
	if err != nil {
		return err
	}
	defer f.Close()

	tag, err := id3v2.Open(f.Name(), id3v2.Options{Parse: true})
	if tag == nil || err != nil {
		return fmt.Errorf("error while opening mp3 file: ", err)
	}
	defer tag.Close()

	cfs := []id3v2.ChapterFrame{
		{
			ElementID:   "0",
			StartTime:   0,
			EndTime:     time.Duration(60000 * 1000000),
			StartOffset: 0,
			EndOffset:   0,
			Title: &id3v2.TextFrame{
				Text:     "chap0",
				Encoding: id3v2.EncodingUTF8,
			},
			Description: &id3v2.TextFrame{
				Text:     "description0",
				Encoding: id3v2.EncodingUTF8,
			},
		},
		{
			ElementID:   "1",
			StartTime:   time.Duration(60000 * 1000000),
			EndTime:     time.Duration(120000 * 1000000),
			StartOffset: 0,
			EndOffset:   0,
			Title: &id3v2.TextFrame{
				Text:     "chap1",
				Encoding: id3v2.EncodingUTF8,
			},
			Description: &id3v2.TextFrame{
				Text:     "description1",
				Encoding: id3v2.EncodingUTF8,
			},
		},
		{
			ElementID:   "2",
			StartTime:   time.Duration(120000 * 1000000),
			EndTime:     time.Duration(180000 * 1000000),
			StartOffset: 0,
			EndOffset:   0,
			Title: &id3v2.TextFrame{
				Text:     "chap2",
				Encoding: id3v2.EncodingUTF8,
			},
			Description: &id3v2.TextFrame{
				Text:     "description2",
				Encoding: id3v2.EncodingUTF8,
			},
		},
	}

	for _, cf := range cfs {
		tag.AddChapterFrame(cf)
	}
	if err := tag.Save(); err != nil {
		return err
	}

	return nil
}

Second, I opened mp3 file by Forecast that is chapter editor of mp3. It has 3 chapters with same start time, duration and title.

Finally, I played mp3 file by IINA because IINA supports chapters. In following gif movie, I select chapter 1 and 2, player jumps selected point (Sorry menu text is japanese)

Super excited for this. Thanks for all the hard work!

Released in v2.1.2

@takaishi -  I have tried to add chapters, and it worked the same way as you show in "Forecast." The issue (well, at least I think it is an issue) is that players don't show chapters. For example, Quick View doesn't show any. I think the reason can be seen on your screenshot - as you can see, the third column ("Include in chapters list") is unselected for each chapter. I have the same mp3 tagged with Python's eyed3, and all the chapters are marked as included and showed just fine by any player I have tried.
I'm not an expert in mp3 tags, but this may be due to a missing CTOC frame. I have tried to add it manually, like this, but it didn't change the result. Any bright ideas or suggestions on how to fix it?
	// create a CTOC frame manually
	ctocFrame := u.createCTOCFrame(chapters)
	tag.AddFrame(tag.CommonID("CTOC"), ctocFrame)

....

func (u *Upload) createCTOCFrame(chapters []chapter) *id3v2.UnknownFrame {
	var frameBody bytes.Buffer
	frameBody.WriteByte(0x03)                // write flags (e.g., 0x03 for top-level and ordered chapters)
	frameBody.WriteByte(byte(len(chapters))) // write the number of child elements

	// append child element IDs (chapter IDs)
	for i, _ := range chapters {
		elementID := fmt.Sprintf("%d", i+1)
		frameBody.WriteString(elementID)
		frameBody.WriteByte(0x00) // Null separator for IDs
	}

	// create and return an UnknownFrame with the constructed body
	return &id3v2.UnknownFrame{Body: frameBody.Bytes()}
}


[BUG] User's Buy more page shows NEGATIVE values.

User purchased a LightNode and Rewards page shows negative values:
-50,000 GRAINs
-$89

Fixed.


Fix acceptable dtypes

fix #634.

This PR probably fix #650.

Is it possible to write a test which make us confirm the issue #634 is solved?


Installation not working with .net core 3+

Hi,
Unfortunately the instructions for .net core don't work with 3+. This is installed on a blank .net core MVC web project.
In the startup.cs you get the error
'RazorViewEngineOptions' does not contain a definition for 'FileProviders'
On changing it to MvcRazorRuntimeCompilationOptions for .net core 3+ it works but you then need Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation package
Then when you run it you get "The partial view 'FormFactory/Form.Property' was not found."
If you then install the FormTemplate package you get swamped with files in the root of the project (as per issue https://github.com/mcintyre321/FormFactory/issues/98) and the following error:
'DateAttribute' is a type, which is not valid in the given context	C\packages\formfactory.templates\5.0.71\contentFiles\any\netstandard1.6\Cell.System.DateTime.cshtml
Cheers

Hi! I've updated the FormFactory.AspNetCore.Example project to aspnetcore 5, compare your Startup.cs with the one on there.
The templates project seems completely messed up, the file paths get lost somewhere along the way.
I'm thinking that it may be possible to ditch the MVC projects in the near future, and just use FormFactory.Standalone ...


Doesn't seem to be able to get it work

Always stuck at the AR Kit is Tracking part.

Walls tend to be very low in unique visual features. ARKit requires these unique features for plane detection. It's unlikely that any ARKit app can detect a wall if it is flat and a uniform color.
https://stackoverflow.com/questions/44422118/how-to-detect-vertical-planes-in-arkit

Same problem, always stuck at the AR Kit is tracking part. Any solution?


Please consider fixing issues detected by repository checker

Notification from ioBroker Check and Service Bot
Dear adapter developer,
I'm the ioBroker Check and Service Bot. I'm an automated tool processing routine tasks for the ioBroker infrastructure. I have recently checked the repository for your adapter hiob for common errors and appropiate suggestions to keep this adapter up to date.
This check is based the current head revisions (master / main  branch) of the adapter repository
Please see the result of the check below.
ioBroker.hiob
   -
:thumbsup: No errors found
WARNINGS:

[ ] :eyes: [W162] js-controller 5.0.0 listed as dependency but 5.0.19 is recommended. Please consider updating dependency at io-package.json.

:thumbsup: No suggestions found
Please review issues reported and consider fixing them as soon as appropiate.
Warnings reported by repository checker should be reviewed. While some warnings can be ignored due to good reasons or a dedicated decision of the developer, most warnings should be fixed as soon as appropiate.
You may start a new check at any time by adding the following comment to this issue:
@iobroker-bot recheck
Please note that I (and the server at GitHub) have always plenty of work to do. So it may last up to 30 minutes until you see a reaction. I will drop a comment here as soon as I start processing.
Feel free to contact me (@iobroker-bot) if you have any questions or feel that an issue is incorrectly flagged.
And THANKS A LOT for maintaining this adapter from me and all users.
Let's work together for the best user experience.
your
ioBroker Check and Service Bot
@mcm1957 for evidence
Last update at Fri, 06 Sep 2024 08:14:11 GMT

Issue outdated due to RECREATE request. Follow up issue #97 has been created.
This issue will be closed.
your
ioBroker Check and Service Bot


Attempting to badge the application icon but haven't received permission from the user to badge the application

I tried everything to make it works and I couldn't do it yet.
$ cordova --version
3.5.0-0.2.7
I tried to use 2 plugins:
https://github.com/phonegap-build/PushPlugin
https://github.com/forcedotcom/PushPlugin#unstable
None of these has worked so far...
I'm currently using IonicFramework and this is how I implemented: (without ngCordova (I got same error)
Teamitup.run ($ionicPlatform, $rootScope, $cordovaPush, $cordovaDialogs, $cordovaMedia) ->
  tokenHandler = (result) ->
    console.log(result)
    UserService.registerDevice('ios', result.deviceToken)

  errorHandler = (result) ->
    console.log("Error " + result)

  document.addEventListener "deviceready", ->
    try
      pushNotification = window.plugins.pushNotification
      pushNotification.register(tokenHandler, errorHandler, {"badge":"true","sound":"true","alert":"true","ecb":"onNotificationAPN"})
    catch error
      console.log error

I tried to implement this code on the AppCtrl but it didn't work either. What else can I try?
Should I try the next plugin to fix this error?
https://www.pushwoosh.com/programming-push-notification/ios/ios-additional-platforms/push-notification-sdk-integration-for-phonegap/
I appreciate your help, thanks a lot!

I fixed this issue following this sample:
https://github.com/hollyschinsky/PushNotificationSample
I think ngCordova 0.1.8-alpha and ionPlatform directive (in services.js) does the magic.
Now I'm getting other error but I think is not related to "Attempting to badge...." issue.
"Register error  - falta la clave de autorización “aps-environment” válida para la aplicación"
I don't know why I'm getting the error in spanish (iOS lang?) but I assume this error is related to this:
http://stackoverflow.com/questions/2452086/no-valid-aps-environment-entitlement-found-for-application
I will continue working and will let you know how I fixed it (if I can).

Teamitup[435:52595] Register success 6e1636fb5a44f912bfc8e18423bf0cc81c43c170adc8988********* :+1:
I just recreated my provisioning profile at:
https://developer.apple.com/account/ios/profile/profileCreate.action?formID=60399352
Downloaded the Provisioning Profile and opened with xcode, then I just went to the Build Settings and selected my new profile, and bum, it worked :)

I finally made it!

hi BeRMaNyA,
I am facing the same issue. My code is based on Holly's example and I've tried both the plugins to no avail. Was there anything else you did to make it work?
I continue to get the following error:
2015-04-21 21:45:35.035 iGazab[1579:386116] [CDVTimer][paypalmobile] 0.203013ms 2015-04-21 21:45:35.114 iGazab[1579:386116] [CDVTimer][file] 78.285992ms 2015-04-21 21:45:35.358 iGazab[1579:386116] [CDVTimer][splashscreen] 243.149996ms 2015-04-21 21:45:35.359 iGazab[1579:386116] [CDVTimer][TotalPluginStartup] 325.559974ms 2015-04-21 21:45:35.597 iGazab[1579:386116] active 2015-04-21 21:45:35.606 iGazab[1579:386116] Attempting to badge the application icon but haven't received permission from the user to badge the application 2015-04-21 21:45:35.614 iGazab[1579:386116] Resetting plugins due to page load.


Bankbg don't stretch with small bank enabled

🐛 Bug Report

@gc I figured you could look into this still. it'd be nice to use small bank & have the image stretch with opening mass quantities.

What I found out:
so I've always been a small bank enabled kind of guy never thought anything of it until I noticed some bank images fill when they do a mass opening but I'm used to all of my images cutting off and being blank.
so I did some digging after magna said all bank images are same size and then said to put a github issue.
before I wrote this, I found this answer from trial and error and search history in the server:
/config user toggle: small bank images (currently on) images cut. and don't fill properly on bigger bank images

the unfortunate solution:
in order for the bank images to look amazing like their supposed to this has to be the setting...
/config user toggle: small bank images (currently off)

bump


fix: allow node_group attributes to be omitted

PR o'clock
Description
https://github.com/terraform-aws-modules/terraform-aws-eks/issues/1462
This fix allows the node_group attributes name and name_prefix to be
explicitly omitted by setting them to null.
This fixes an edge case where the attribute was set, but null, which
would cause the conditional logic to be incorrect.
Checklist

[x] README.md has been updated after any changes to variables and outputs. See https://github.com/terraform-aws-modules/terraform-aws-eks/#doc-generation

I quickly tested and verified locally that this corrects the ability to omit the name and name_prefix node_group attributes by setting them to null.

@barryib
Apologies for pinging you, but is there a chance someone could take a look at this, please?

@barryib This is a pretty big bug with a pretty easy fix that prevents us from using a newer version of terraform, could we please get some attention on this?

I've created a fork with this fix until the maintainer returns.
You can use it by setting the source as follows:
module "eks" {
  source = "git@github.com:ElementAnalytics/terraform-aws-eks?ref=v17.1.1"
}

@bryantbiggs Just pushed an update to break it up into multiple lines

@bryantbiggs Hello, and chance we could get some follow up on this, please?

hi @apeschel I haven't had time to test this yet, apologies - could you update an example to show how this functionality is intended to work please? https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples

@bryantbiggs Hello, I've updated the managed_node_groups with details on how to take advantage of terraform functionality to use newer versions of this module with clusters built using older versions of this module.
This is only possible with the bug fix in place. As previously mentioned, the bug breaks the normal terraform behavior, and this example isn't possible.

@bryantbiggs Hello, could I get some follow up on this please?

apologies, I haven't had time - @daroga0002 what do you think?

I feel a pain of upgrading, but as we arleady decided to release breaking changes in module I really wish to avoid this kind tricks in code (as this code looks really hacky style).
Those are just my open thoughts.

I am looked over this from mobile, maybe I will later take a look from computer as maybe it is not so scary as looks on mobile.
I will take a look into this tomorrow.

I really wish to avoid this kind tricks in code (as this code looks really hacky style).

@daroga0002 With all respect, the original code snippet was incredibly arcane and hacky to the point that it was broken and no one realized. This is just a bandaid with lots of comments to make it clear that it's arcane and hacky, and why it's being done.
It also has the benefit that it actually works.

I am checking a releases and see in v17.0.0 was attached this note https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/upgrades.md
does this is not working?

@daroga0002 No, because you can't ommit the node_group attribute by setting it to null. This attribute is broken with the current code.

Ok, I analysed this again and now understand issue.
Correct me if I am wrong but you want to use common code where you use node groups definition:
name = var.cluster_node_groups_name

and for some clusters is:
cluster_node_groups_name=null
where for others:
cluster_node_groups_name=something

@daroga0002 Yes, that's exactly right - unfortunately the current code doesn't work correctly with the null branch.

@apeschel  can you update PR as per comments?

@daroga0002 Just pushed an update - I left a small comment for some context, please let me know if you want that removed as well. Should only take a moment.

I am trying to replicate this issue (for testing) and seems on current master of module I am not able to achieve error.
I have:
$ terraform version
Terraform v1.0.6
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v3.57.0
+ provider registry.terraform.io/hashicorp/cloudinit v2.2.0
+ provider registry.terraform.io/hashicorp/kubernetes v2.4.1
+ provider registry.terraform.io/hashicorp/local v2.1.0
+ provider registry.terraform.io/hashicorp/null v3.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0
+ provider registry.terraform.io/terraform-aws-modules/http v2.4.1

and code of module:
module "eks_cluster" {
  create_eks = var.eks_create
  # https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest
  source          = "terraform-aws-modules/eks/aws"
  version         = "17.15.0"
................
  node_groups = {
    pool = {
      name              = var.cluster_node_groups_name
      desired_capacity  = 2
      max_capacity      = 2
      min_capacity      = 2
      instance_types    = ["r5.xlarge"]
      subnets           = ["subnet-07a78a7e8184e3702"]
      disk_size         = 20
    }
  }

variable set to:
cluster_node_groups_name = null

@apeschel which version of terraform you saw this errors?

I was using terraform 0.14.X at the time, I believe. Let me see if I can reproduce it on 1.0.X


sources of entropy / letters

for the 'letter' NFT we want some source of randomness. using a real VRF would be expensive and complex, esp for a hackathon
some other ideas
for each mint there are some special variables available that would give us a different result each mint:

use the senders wallet address
latest ETH block
current gas price
timestamp of TX?

while a hostile miner maybe able to fake some of these, a fractional change in say gas price for the tx
https://docs.soliditylang.org/en/v0.8.7/units-and-global-variables.html#block-and-transaction-properties
if the minting TX has some other parameters such as a generated TX id, that would also give us more fields to work with.
https://www.trustology.io/insights-events/decoding-an-ethereum-transaction-its-no-secret-its-just-smart
cc @tomosaigon @keepRunning

blockhash of blocknumber-1


Integration add-on not showing within HA?

This is usually a cache issue.
If you see in the HA log a text like:

2020-12-22 14:16:08 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for alarmo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

HA is notorious for having caching issues, please refresh the browser (or try incognito mode).

This is usually a cache issue.
If you see in the HA log a text like:

2020-12-22 14:16:08 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for alarmo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

HA is notorious for having caching issues, please refresh the browser (or try incognito mode).

I have tried installing the addon in Incognito mode (Chrome). The problem still persist.

Did you solve your problem in the meantime?

Did you solve your problem in the meantime?

No

im having the same problem. refreshed, cleared cache, reinstalled. still doesnt show up in integrations search.

im having the same problem. refreshed, cleared cache, reinstalled. still doesnt show up in integrations search.

It's really a mystery to me.
I assume you see this message:

2020-12-22 14:16:08 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for alarmo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

Any clues displayed in the logs?

It's really a mystery to me.
I assume you see this message:

2020-12-22 14:16:08 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for alarmo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.

Any clues displayed in the logs?

fully up to date and no logs

fully up to date and no logs

even tried manual install and still not showing up in integrations...

even tried manual install and still not showing up in integrations...

got it. had to go with a private tab

got it. had to go with a private tab

So it was a cache issue after all.
That’s good to know (for other people)!

So it was a cache issue after all.
That’s good to know (for other people)!

I'm closing this issue since there is no activity.
@LRNGCODE please reach out if you need help setting up Alarmo (there is likely a cache issue).

I'm closing this issue since there is no activity.
@LRNGCODE please reach out if you need help setting up Alarmo (there is likely a cache issue).

Hello.
I run into the same problem and have tried it too with icognito mode. I thjink this issue isn't fixed yet.

Same issue. Tried everything.

Same issue. 3 years later. On 2023.9.1.

"same" issue, but i actually mean that I cant find it to install it in the first place... I've tried:
incognito/regular browser/edge 🤢
force reset cache (ctrl+f5)
nabu casa url and homeassistant.local
@When searching for "alarmo" to install, it only whows "alarm decoder" and "antifurto365 iAlarm"

If you see this message https://github.com/nielsfaber/alarmo/issues/75#issuecomment-758152164 in the HA logs after installing the files, the integration is installed and it should show up in the list. If it doesn’t, it’s for sure a cache issue. Try with another device or browser.

hmmm, it looks like the way you add HACS integrations has completely changed, different than most videos out there...
I got it to work by going directly to HACS to add integrations, NOT "HA settings->devices/integrations->add" like videos show

if it isnt working for you currently, go to your HACS page (http://homeassistant.local:8123/hacs/entry) to search for alarmo, it no longer shows up in "HA settings->devices/integrations->add" so you have to do it this way


stuck on loading

The console shows this error:
Uncaught TypeError: Cannot read property 'map' of undefined
Loaded 3 tables. The application hangs on the data page. It won't move to any view page.

That's not good. Does this happen for you with the sample data? It isn't happening with the sample data for me, so I'm wondering if there is something specific in the data-set you are using that is making something go wrong.
Also, can you paste the full console output with line numbers? Then I'll be able to track down exactly where the issue is happening and may be able to figure out how to recreate it from there. Thanks!


⚠ Bofrost.fr has degraded performance

In 49d9c58, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1316 ms

Resolved: Bofrost.fr performance has improved in b14630a after 17 minutes.


fix: add workaround patch for elyra validate

Patch to fix failing of elyra validation command for pipelines with default values.
Fixes #257
Description
elyra-validate cmd was failing for pipelines that contain both pipeline parameters and default properties.
How Has This Been Tested?

Run the image in bash.

podman run -it --rm -p 8888:8888 quay.io/opendatahub/workbench-images:jupyter-datascience-ubi8-python-3.8-pr-324 bash

Copy the files params.pipeline and params-test.py from here.
Validate pipeline using elyra-validate command.

elyra-pipeline validate params.pipeline

Merge criteria:

[X] The commits are squashed in a cohesive manner and have meaningful messages.
[X] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
[X] The developer has manually tested the changes and verified that the changes work

/test notebook-codeserver-ubi9-python-3-9-pr-image-mirror


Multiple crumbs

This PR adds the ability for a controller to provide a number of breadcrumbs.
Be aware that this PR includes the changes in the ember-cli branch.

I've updated this PR with my changes moved into the JavaScript.

Regarding multiple crumbs per controller, I think there is a reasonable need for this. I'm not sure what the best API to accomplish this is quite yet.

I'm using this API in our code and it works very well:
  breadCrumbs: function() {
    var lists = this.get('model');
    var lists = [list].concat(list.get('parents'));
    return lists.map(list => ({
      label: list.get('name'),
      model: list
    })).reverse();
  }.property('model'),

I'd like to make sure that, however it gets implemented, it's hard for users to add multiple crumbs in a way that would break live-updating via bindings. I'll think about this a bit.

There's definitely no issues with breaking bindings in this implementation.

I just noticed #10, and should point out that this becomes easy if we support breadCrumbs containing objects rather than just strings.

Hi there, what's the status on this PR? We're using this in our app and it's working very nicely. Would be good to get this merged in, and I'm sure we're not the only people who will need this feature. I'd be happy to change crumb.label back to crumb.name if you like, and we can add backwards-compatibility as well if you think it's necessary although it's pretty trivial to upgrade breadCrumb: {} to breadCrumbs: [{}].
Let me know your thoughts :)

Hey, sorry for the delay responding – I'm out of town for a funeral.
I agree that this is a commonly desired feature and needs to get merged in. I'd been hoping wrap the component in some system tests before adding new features, but it's probably best to go ahead and get this supported.
I would like to see some compatibility for specifying only one crumb without need for an array. This will allow the common case to make use of computed property helpers and be a bit cleaner aesthetically.

Okay cool, I've added that. Another thing that we've needed is the ability to provide the model for the transition. I haven't updated the README because my feeling is that we should document the breadCrumbs: [{label: 'Foo'}] rather than the breadCrumb: 'Foo' usage because it's the usage that provides support for all the features (multiple crumbs, specifying path, model and linkable) but it's really your call.

I appreciate your help! I'll get that merged in soon and cut a release.


Small window mode

It would be nice if the app could work in the background like a small window and look good. Personally, I prefer to see the time while studying or working. So I think it may be useful for other users.

it's ok if you can zoom inside your terminal window

@matmaer what do you mean? To zoom out to make it smaller?

indeed


Parsing error: Unexpected token /

When I use eslint on the command line I don't get any errors, but inside VS Code it complains about this line (at the closing h1 tag):
render() {
        return
Hello, World!
;
}

.eslintrc.json:
{
    "env": {
        "browser": true,
        "commonjs": true,
        "es6": true,
        "node": false
    },
    "parserOptions": {
        "ecmaVersion": 6,
        "ecmaFeatures": {
            "jsx": true
        },
        "sourceType": "module"
    },
    "plugins": [
        "react"
    ],
    "extends": ["eslint:recommended", "plugin:react/recommended"]
}

Extensions settings:
    "eslint.enable": true,
    "eslint.options": {
        "extensions": [
            ".js",
            ".jsx"
        ]
    },
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        "jsx",
        "html"
    ]

(VS Code identifies my file as JavaScript React)
ESLint version: tried 6.0.1, 5.16, 5.13 (global eslint - same version)
VS Code: 1.35.1
Extension version: 1.9.0

@sryze can you please provide me with a GitHub repository I can clone that demos this. This ensures that we are using the same setup.

and one more thing. Can you paste a screen shot of the error first to ensure that the error is really produced by the ESLint plugin.

Can you provide me with a GitHub repository that demos this. HTML support works fine for me.

Here you go: https://github.com/sryze/vscode-eslint-issue-702
Reproduce the bug with:
Version: 1.36.0 (user setup)
Commit: 0f3794b38477eea13fb47fbe15a42798e6129338
Date: 2019-07-03T13:25:46.372Z
Electron: 4.2.5
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362

I think it has something to do with my local eslint, when I use the global package
eslint react/MyComponent.jsx

output:
MyComponent.jsx
  1:16  error  'h' is defined but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)

However, if I run the local version:
npx eslint react/MyComponent.jsx

it produces:
MyComponent.jsx
  6:31  error  Parsing error: Unexpected token /

✖ 1 problem (1 error, 0 warnings)

If I uninstall the local eslint package, VS Code ESLint works as it should.

Both local and global eslint are version 6.0.1.

This seems to explain it. ESLint 6.0.1 changed the way how eslint plug-ins are resolved and they now recommend that everything is installed locally. You might want to read https://github.com/microsoft/vscode-eslint/issues/696
I will close the issue. Please ping if #696 is not helpful for you.

Same problem with ESLint 5.16, I don't think it's related to the version.
The extension works only if I delete the local eslint package and install eslint globally.

Thanks for the repository.
The same happens when running eslint from the command line

@sryze I will close the issue since this is not related to the ESLint extension. If you still see the error with a successful validation in the terminal please ping.


Outgoing SMS and Calls Labeled as Sent Mail

Backed up "SMS" and "Call logs" each have their approproiate respective labels in Gmail, but all outgoing SMS and Calls are also labled as Sent Mail.  Is there a setting or other technique that would prevent outgoing SMS messages and Calls from being labeled as Sent Mail?
For my taste, the only place that SMS and Calls should show up in Gmail is under their respective labels, not mixed in with actual email messages.
Thank you.

Any news on this one? This is very annoying, it's cluttering my Sent Mail folder in a big way.

maybe this helps:
https://github.com/jberkel/sms-backup-plus/#faq-backup-inbox

no this not help, and funny part is that, i have fixed this on my regular gmail account, but when i moved to g suite, these sms and call logs messages are back in the sent folder.
and no, i dont know/remember how i fix it, i dont have that kind of filters so :)

Ok, i find some kind of "fix".
If you dosnt want see "call logs" or "SMS" in your sent folder, then make a favorite of the sent folder with url:
https://mail.google.com/mail/u/1/#section_query/is%3Asent+-chats+-Call%2Blog+-SMS
This url hides hangouts messages also with call logs and sms folders from your sent folder.
If you use multiple inbox lab feature, then add your sent folder there with: is:sent -chats -Call+log -SMS


chromedriver.exe crashes in Windows 11.

Chrome webdriver chromedriver.exe, current stable version 130.0.6723.58, intermittently crashes on Windows 11. This driver is used in an autotest with pretty recent Chrome browser, 130.0.6723.59.
This happens when testing UI involving with opening popup and closing popup. Don't know if this relates to an issue (filed by other user) to Selenium HQ that the switching between browser windows does not work, driver.switchTo().window(nameOrHandleString).
Windows reported
Faulting application name: chromedriver.exe, version: <IP_ADDRESS>, time stamp: 0x670d7f1f
Faulting module name: chromedriver.exe, version: <IP_ADDRESS>, time stamp: 0x670d7f1f
Exception code: 0xc0000005
Fault offset: 0x00000000000cf299
Faulting process id: 0x0x1813C
Faulting application start time: 0x0x1DB24A0A077C29E
Faulting application path: C:...\chromedriver.exe
Faulting module path: C:...\chromedriver.exe
Report Id: d3eef661-6e74-4175-badb-11777377d9a0
Faulting package full name:
Faulting package-relative application ID:
Exception reported in a dump file:
rax=0000141000098f00 rbx=00000000ca2db701 rcx=7f6ff6ffefebffff
rdx=0000002b4f0fee88 rsi=0000002b4f0fee88 rdi=0000000000000c41
rip=00007ff6248af299 rsp=0000002b4f0fe6c8 rbp=0000002b4f0fed90
r8=0000000000000c41  r9=00000113ca2db701 r10=0000000000000001
r11=fffffffff6f22d9a r12=00001410000fcad0 r13=0000002b4f0fe980
r14=0000141000098f00 r15=aaaaaaaaaaaaaaaa
iopl=0         nv up ei pl nz na po nc
cs=0033  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00010206
chromedriver+0xcf299:
00007ff6248af299 488b01          mov     rax,qword ptr [rcx] ds:7f6ff6ffefebffff=????????????????
Thanks,

I see the same problem with chrome 125 and 129 on ubuntu:23.04, coincidentally, I also observed that some scenarios will be crashed when open the pop up.
I didn't see any useful logs or debug logs with the argument --enable-logging=stderr --v=1, how can I fetch more details logs?
Thanks


IPF timeseries is possibly implicit

In GitLab by @Huite on Jan 10, 2019, 10:44
For the associated IPF txt files, it's possible to have an implicit itype: when it's not specified, it's a timeseries (itype=1).
Such files currently result in an error, since one of the functions attempts to split the line containing this itype, then fails to find it.

In GitLab by @Huite on Mar 12, 2019, 10:05
closed

In GitLab by @Huite on Mar 12, 2019, 10:05
Fixed by https://gitlab.com/deltares/imod/imod-python/commit/323d56916540e0fd0e9be057467959f316408876


Added library support and updated documentation

I found your repo and I wanted to use it as a library. I ended up making the functions public and exporting

Sure thing! I love transit and work with GTFS a lot and I had built gtfs-parser recently, which is a project that is similar, but in typescript inspired by the out of date gtfs2geojson. I was looking for a drop in solution for a project called simple-transit-map.
Eventually I would like to use rust on client side alongside mapbox and maybe extend one what i have built with simple-transit-map to ingest gtfs directly on client.
I was not able to squash the changes. Something has happened on my computer where it is just complaining about how I cannot squash merges. This seems to be an open issue.
Issue
https://github.com/desktop/desktop/issues/13051

It’s ok, I forgot that github has a feature to squash itself.
Thank you for the contribution!


Remove guava dependency

Hi,
guava is a library which is often used in various projects and leads very often to version conflicts. In my experience libraries should almost never use guava - only applications should use it. You are currently using the library only for a single method - to find default values for fields that cannot be decrypted. I suggest to move the required code into your library and to remove guava as dependency.

Ahh, yes. This one has been on my to-do list for a while :+1:

The Guava dependency has been replaced with an extensible DefaultValueProvider.


View details of per virtual host (filtering)

Hi Developers,
Thanks for this great application, it really helps me a lot.
There are many virtual hosting in my server.
Is it possible to view the detail of one selected virtual host ?
Thanks.

Certainly, awk, grep, sed are your friends for this, e.g. (assuming your vhost is the first field),
awk '$1~/dev.domain.com/' access.log | goaccess --log-format=VCOMBINED -

Thanks a lot. :smile:


Add RSpec formatter for Circle CI

With this formatter, Circle should pretty-print our failures. We need a custom spec command because otherwise Circle only runs RSpec, while bundle exec rake runs rake bundle:audit as well.
https://circleci.com/docs/test-metadata#automatic-test-metadata-collection
I also changed the specs so we can see how failures look now. I'll remove the failures before merging.

circle died

Do you mean the failures? I added intentional failures (aedb2b4). Or do you mean something else?

Oh okay. I've never done anything with circle before so this is all new.

I think it looks good then? I'm not sure why we would want an intentional failure after we've seen what one looks like...

I'm not sure why we would want an intentional failure after we've seen what one looks like

If you look at the failure from this branch: https://circleci.com/gh/gabebw/hotline-webring/116
vs the failure from older branches: https://circleci.com/gh/gabebw/hotline-webring/110
At the top of build 116 (the first one), Circle nicely formatted the failures for us and we don't have to scroll down to see them, like we do in build 110. I added (temporary) failures so we could see them nicely formatted, since otherwise we wouldn't have any failures because we run clean :leaves:.

Cool! Yeah that looks good, but I think I'm asking the wrong question.
I assume you added the formatter so that in the future, when tests fail, we have easy to read failure messages. This branch is has a failing test now so we can test that the formatter worked. If we merge it without changes, we'll have a failing test in our code. Do you plan to remove the failing test now that we know the formatter works?

Do you plan to remove the failing test now that we know the formatter works?

Yep, from the PR description :smile: :

I also changed the specs so we can see how failures look now. I'll remove the failures before merging.

Oh okay I missed that. Thanks! Looks good to me!

This has been a weekly demonstration on miscommunication. Now back to our regularly scheduled webring.


Change react-native package for better secure storage.

The previous package for storing secure data react-native-sensitive-info did not store the data for Android in the keychain.
Replacing that package with react-native-secure-key-store allows for both iOS and Android data to be stored in the keychain.
Along with changing the package, I changed the way the Exposure Configuration is being stored. It is no longer being stored in the secure storage, but rather just in the AsyncStorage. The exposure configuration is not sensitive data, as it's the same file downloaded from the server for every person.

The configuration file is the item in question being downloaded and stored in "non-secure" storage.
-- this file is the same for all users, so there is no need to store it securely
-- the file operations on the downloaded configuration data (write / read) can happen while the app is running in the background and / or the phone is locked, which would mean that the data wouldn't be stored securely, even though it was in the keychain.
-- the code would be different anyway, given point #2.
-- I think it's good to be clear that the configuration isn't stored securely

Thanks for the context @jeberhardt , lgtm.


add ability to build with ninja generator.

potentially speed up building.

Note, for add_definitions(-DWIN32_LEAN_AND_MEAN), is unrelated with ninja, but might be useful in the future. When you or you submodule inlcude windows.h, it might cause nasty error message due to macro expansion. To elaborate, please refer to https://github.com/pytorch/pytorch/issues/25320

Thanks for this PR, I'm currently looking into how we should generate for Ninja. Just a comment on WIN32_LEAN_AND_MEAN but could you separate this change to a different PR? It'll make a cleaner history that's easier to discuss based on.

Does this (having Ninja installed) work with sdist?

OK, I grab a linux box and build it with
export CHAINER_BUILD_CHAINERX=1
export CHAINERX_BUILD_CUDA=1
export CHAINERX_NVCC_GENERATE_CODE="arch=compute_60,code=sm_60"
export CUDNN_ROOT_DIR=/usr/local/cuda-10.0

python setup.py sdist
cd <path/to/dist>
python setup.py install

and it works as it should be.

add_definitions(-DWIN32_LEAN_AND_MEAN) removed

What if you replace the last line to use pip install <path/to/dist> (I verified that your snippet above worked)? That's by the way how Travis CI installs Chainer. I'm then failing to import chainerx and it seems to be caused by the fact that $ORIGIN is omitted from RUNPATH in the generated _core.so (readelf -d _core.so).
cmake version 3.12.3
ninja version 1.9.0

CI failure seems due to precision issue.
@hvy
export CHAINER_BUILD_CHAINERX=1
export CHAINERX_BUILD_CUDA=0

python setup.py sdist --formats=tar
pip install <path/to/dist>

now works.
As for original target_link_libraries with linker flags in it, is not good practice, linker flags is not target anyway.

@hvy OK, make it as simple as possible now

Jenkins, test this please.

@cloudhan Thanks for the quick fixes. I think that's better. Could you take a look at the CI failures? The Travis failure is due to style but one is due to a failure of finding the shared object (using pip install).

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

Jenkins, test this please.

@cloudhan The latter of this still seems to be an issue. Could you address it?

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

Jenkins, test this please.

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

Jenkins, test this please.

Jenkins CI test (for commit e66c2a865526b0cc10f2798902bc6aed5504e798, target branch master) succeeded!

Jenkins, test this please.

Jenkins CI test (for commit e66c2a865526b0cc10f2798902bc6aed5504e798, target branch master) succeeded!

LGTM!


Allow cortextool rules load * (wildcard) as input.

Since a proper tree structure can be defined because namespaces/groups exist for rules. It'd be nice if we could just wildcard the input to load all files in a directory via cortextool.
For exmaple;
Directory structure
tenant_a:
  rules:
     a.yml
     b.yml
     c.yml

tenant_b:
  rules:
     x.yml
     y.yml
     z.yml

Load in by calling cortextool rules load ./rules/tenant_a/*. This would load in rules a,b,c and vice-versa for alertmanager config and templates.

Apparently this already exists and works... I swear this didn't like 3 weeks ago.
Sorry


[V2V] Add fixed SSH key file path for virt-v2v-wrapper

With UCI, the path for the SSH private key file that virt-v2v-wrapper uses must be provided in the input JSON. Because ManageIQ will mount the private key file as /var/lib/uci/ssh_private_key, this pull request adds a hard coded attribute to the generated input.
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1825023

@miq-bot add-label v2v, bug, ivanchuk/yes, jansa/yes?
@miq-bot add-reviewer @agrare

Jansa backport details:
$ git log -1
commit fa19aa756de34efd08ccb38ca63061dd07c28120
Author: Jason Frey<EMAIL_ADDRESS>Date:   Wed Apr 29 07:58:39 2020 -0400

    Merge pull request #20102 from fdupont-redhat/v2v_bz_1825023

    [V2V] Add fixed SSH key file path for virt-v2v-wrapper

    (cherry picked from commit eca97f587617c57b9043da6d0a0c1791fa22cce8)

    https://bugzilla.redhat.com/show_bug.cgi?id=1825023


AppxManifest.xml cant regesterin

I tried it 4 times it keep showing this error
i followed this video : https://www.youtube.com/watch?v=rIt00xDp0tM

Can you try enable Developer Mode. Search on menu start  "Developer settings", open first suggestion and enable  Developer Mode option.

I tried ur suggestion and I did it. Think


Update cats-effect, cats-effect-kernel, ... to 3.4.7

Updates

org.typelevel:cats-effect
org.typelevel:cats-effect-kernel
org.typelevel:cats-effect-std

from 3.4.6 to 3.4.7.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.typelevel" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "org.typelevel" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, version-scheme:early-semver, commit-count:1

Superseded by #110.


Link quebrado para o website

The link in repo is broken!
Correct.
https://designsystemsbrasileiros.com
Incorrect.
https://designsystemsbrasileiros.com**.br**

Thanks, Raphael. Already fixed it.


Feature Request: Automatic placeholder containing name of schema I'm operating on.

Problem
I'd like to run a Flyway SQL script using the command line interface, and apply it in sequence to multiple schemas. Inside of the SQL script, I'd like to use a placeholder for the schema name that I'm currently operating on.
Proposed solution
Automatically define a placeholder variable with some distinct name, e.g. CURRENT_SCHEMA, containing the name of the schema that Flyway is currently acting on.
Existing workaround
Use -placeholders.myPlaceholder=.. option.
Why proposed solution is better than workaround

Shorter commands.
Avoid errors when I forget to specify the placeholder.
Avoid errors when I set placeholder to something else than the schema name specified in the Flyway URL.

Related to #1039


az extension update --name aks-preview cannot find the installed extension aks-preview

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

After running az upgrade to upgrade azure-cli from 2.12.0 to 2.14.0, I cannot upgrade aks-preview.
az extension update --name aks-preview
The extension aks-preview is not installed.
To Reproduce

Expected behavior

Update aks-preview from "0.4.64" to "0.4.65"
Environment summary

az version:
{
  "azure-cli": "2.14.0",
  "azure-cli-core": "2.14.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "account": "0.2.0",
    "aem": "0.1.1",
    "ai-examples": "0.2.4",
    "aks-preview": "0.4.64",
    "alertsmanagement": "0.1.0",
    "alias": "0.5.2",
    "application-insights": "0.1.11",
    "attestation": "0.1.0",
    "azure-firewall": "0.6.2",
    "blockchain": "0.1.0",
    "blueprint": "0.1.1",
    "codespaces": "0.3.0",
    "connectedk8s": "0.2.6",
    "connectedmachine": "0.2.0",
    "connection-monitor-preview": "0.1.0",
    "costmanagement": "0.1.0",
    "custom-providers": "0.1.0",
    "databox": "0.1.0",
    "databricks": "0.7.0",
    "datafactory": "0.1.0",
    "datashare": "0.1.1",
    "db-up": "0.2.0",
    "desktopvirtualization": "0.1.0",
    "dev-spaces": "1.0.5",
    "dms-preview": "0.12.0",
    "eventgrid": "0.4.9",
    "express-route": "0.1.3",
    "express-route-cross-connection": "0.1.1",
    "footprint": "1.0.0",
    "front-door": "1.0.9",
    "guestconfig": "0.1.0",
    "hack": "0.4.2",
    "hardware-security-modules": "0.1.0",
    "healthcareapis": "0.2.0",
    "hpc-cache": "0.1.2",
    "image-copy": "Unknown",
    "import-export": "0.1.1",
    "interactive": "0.4.4",
    "internet-analyzer": "0.1.0rc5",
    "ip-group": "0.1.2",
    "k8sconfiguration": "0.1.8",
    "kusto": "0.1.1",
    "log-analytics": "0.2.1",
    "log-analytics-solution": "0.1.1",
    "logic": "0.1.0",
    "maintenance": "1.1.0",
    "managementpartner": "0.1.3",
    "mesh": "0.10.6",
    "mixed-reality": "0.0.2",
    "netappfiles-preview": "0.3.2",
    "notification-hub": "0.2.0",
    "peering": "0.2.0",
    "portal": "0.1.1",
    "powerbidedicated": "0.1.1",
    "privatedns": "0.1.1",
    "resource-graph": "1.1.0",
    "scheduled-query": "0.2.0",
    "spring-cloud": "1.1.1",
    "ssh": "0.1.1",
    "stack-hci": "0.1.0",
    "storage-blob-preview": "0.3.0",
    "storage-or-preview": "0.4.0",
    "storage-preview": "0.3.0",
    "storagesync": "0.1.0",
    "stream-analytics": "0.1.0",
    "subscription": "0.1.4",
    "support": "1.0.2",
    "swiftlet": "0.1.0",
    "synapse": "0.3.0",
    "timeseriesinsights": "0.1.3",
    "virtual-network-tap": "0.1.0",
    "virtual-wan": "0.2.1",
    "vm-repair": "0.3.3",
    "webapp": "0.2.24"
  }
}

Additional context

az feedback with 9 got below error:

Close it since I installed all extensions development mode


Add getting started docs

I think getting started should cover at least

[ ] Constructing a spec with the pythonic classes and running
[ ] Running a spec remotely with a worker
[ ] Constructing and running a simple workflow with pythonic classes
[ ] Inspecting the JSON that can be stored

The key is that it should be short and sweet (ideally 10-15 statements that a developer will actually take the time to do), yet flex a lot of the system components.

#80 may provide a starting point.

Maybe download image and perform simple operation (blur) and output resulting image.

I'll sanity check that these are good to go.


Make it possible to use different content templates for different regions

This is more an Idea for an improvement than an Issue/Bug.
For some content types (section for example) it would be nice to use different templates depending on the region the content type is contained in.
For now you can only restrict a whole content type to a region, not the some special TYPE_CHOICES of it:
Page.create_content_type(SectionContent, cleanse=True,
    TYPE_CHOICES=(
        (u'big_pic', _(u'For Main')),
        (u'small_pic', _(u'For Sidebar')),
    ),
    regions=('sidebar_region','main_region',))

This has the disadvantage, that if the user chooses the "wrong" one it could crash the design of the page.
I see two possible solutions:
The first is: Extending TYPE_CHOICES like this:
  Page.create_content_type(SectionContent, cleanse=True,
      TYPE_CHOICES=(
          (u'main', _(u'Main'), ('main_region',)),
          (u'sidebar', _(u'Sidebar'), ('sidebar_region',)),
      ))

This would allow ro register some types for some regions only
=> Disadvantage: API-Changes
The other solution could be a convention for the templates like it is done in mediafile/section using the type. For example the section content types render method could be changed from
def render(self, **kwargs):
    if self.mediafile:
        mediafile_type = self.mediafile.type
    else:
        mediafile_type = 'nomedia'
    return render_to_string([
        'content/section/%s_%s.html' % (self.type, mediafile_type),
        'content/section/%s.html' % self.type,
        'content/section/%s.html' % mediafile_type,
        'content/section/default.html',
        ], {'content': self})

to something like this:
def render(self, **kwargs):
    if self.mediafile:
        mediafile_type = self.mediafile.type
    else:
        mediafile_type = 'nomedia'
    return render_to_string([
        'content/section/%s__%s_%s.html' % (self.region, self.type, mediafile_type),
        'content/section/%s_%s.html' % (self.type, mediafile_type),
        'content/section/%s__%s.html' % (self.region, self.type),
        'content/section/%s.html' % self.type,
        'content/section/%s.html' % mediafile_type,
        'content/section/default.html',
        ], {'content': self})

The amount of templates in the render_to_string call should not explode, because if you have f.e. 18 apps, 2 custom TEMPLATE_DIRS and 8 options in a render_to_string call, you'll end up with 160 paths being searched in the worst case. Because of that I wouldn't want to solve this issue using the method mentioned last (especially since it is so easy to subclass the content type, override the render method and create the content type using your own subclass instead -- as long as you don't add new fields and don't change the class name, you won't even have to update your database.)
Most of the time when we need different templates for different regions we either override the render() method or we put an {% if content.region == "main" %}...{% else %}...{% endif %} statement into the template. With current Django trunk it gets even better because now Django templates finally support an {% elif %} statement.
I'd say this might make a good addition to the documentation under advanced topics, maybe?
(http://www.feinheit.ch/media/labs/feincms/advanced/index.html)

You're absolutely right regarding the number of paths being searched for templates - doesn't seem to be the right way to do it.
In my case, like you suggest here, i subclassed the content type - but as my subclasses had a different name i had to update the database and so ended up with multiple tables for the same content type - but at least it worked.
I don't know if i understand this part of your answer right:
".. as long as you don't add new fields and don't change the class name, you won't even have to update your database .."
Do you mean something like:

registering the first content type
subclass it using the same name and overriding render
register the other content type (using the same name)

If so, this feels very much like a hack or workaround to me (but at least it works i think...)
Maybe some mechanism could be used for determining the right table name, like introspecting if there are Fields defined in the subclass or a get_table_name method which could be overridden with a super call if the same table should be used.
Because for me it just doesn't seems to be the right way to do it using the "same name for different classes" approach...


Issue with booting

I have been able to succesfully build the gateware and boot images following the instructions for the nexys4ddr board.
I copy the generated boot.bin, initramfa.cpio, and digilent_nexys4ddr.bit  to a USB-stick (also tried SDcard with the same result) but get the following error:
--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
             Timeout
Booting from SDCard in SD-Mode...
Booting from boot.json...
Booting from boot.bin...
SDCard boot failed.
Booting from network...
Local IP: <IP_ADDRESS>
Remote IP: <IP_ADDRESS>
Booting from boot.json...
Booting from boot.bin...
Copying boot.bin to 0x80000000...
Network boot failed.
No boot medium found

--============= Console ================--

litex>

How can I debug this? I am suspecting a mismatch between the boot image and the core somehow. I have attached the entire boot sequence from power on.
I have set the jumpers for booting from USB/SD correctly. It worked with another litex system with a 32-bit processor.
boot.log

On Mon, Dec 05, 2022 at 08:35:22AM -0800, Mats Brorsson wrote:

How can I debug this? I am suspecting a mismatch between the boot image and the
core somehow. I have attached the entire boot sequence from power on.

With BBL-based LiteX+Rocket, you're expected to build the initramfs
cpio archive into the kernel, rather than load it in as a separate
file. The initramfs goes inside vmlinuz, which goes inside bbl,
resulting in a single boot.bin blob that gets loaded by the LiteX
bios (either using tftp, or from the sdcard).

I have set the jumpers for booting from USB/SD correctly. It worked with
another litex system with a 32-bit processor.

The jumpers will only help you get the bitstream loaded from sdcard.
Once that's done (i.e., the fpga becomes a "computer"), the jumpers
should no longer matter, it's down to the LiteX built-in bios from
that point forward.

Thanks, so the loading of the bitstream works then. But apparently the BIOS cannot read from the SD/USB. This is the process I would like to debug. Is there a way to do that? I realise now that even though I can load the FPGA bitstream from the USB-stick, the BIOS can probably not read from the USB (but I got the same problem when I bit the boot.bin on the SDcard.
I will try to send the boot.bin over the serial port instead.

I just found this that you wrote on your web page "Booting from a µSD card (in SPI mode) is also currently supported.". I did not build the system with --with-spi-sdcard so I will try that.

So booting from SDcard still doesn't work. It seems not to recognise the boot image.
When I try to boot from serial, it starts but fails with this message:
sL5DdSMmkekro
[LITEX-TERM] Received firmware download request from the device.
[LITEX-TERM] Uploading boot.bin to 0x40000000 (17920552 bytes)...
[LITEX-TERM] Upload calibration... (inter-frame: 10.00us, length: 64)
[LITEX-TERM] Got unexpected response from device 'b'E''

I use this command:
litex_term /dev/ttyUSB1 --serial-boot --kernel boot.bin

Ok, I got progress with --with-spi-sdcard
--============== Boot ==================--
Booting from serial...
Press Q or ESC to abort boot completely.
sL5DdSMmkekro
             Timeout
Booting from SDCard in SPI-Mode...
Booting from boot.json...
boot.json file not found.
Booting from boot.bin...
Copying boot.bin to 0x80000000 (17920552 bytes)...
[########################################]
Executing booted program at 0x80000000

--============= Liftoff! ===============--

But it is still tuck at this stage and I will rebuild busybox, the kernel and BBL to see if it helps.

On Mon, Dec 05, 2022 at 11:42:43PM -0800, Mats Brorsson wrote:

sL5DdSMmkekro
[LITEX-TERM] Received firmware download request from the device.
[LITEX-TERM] Uploading boot.bin to 0x40000000 (17920552 bytes)...
[LITEX-TERM] Upload calibration... (inter-frame: 10.00us, length: 64)
[LITEX-TERM] Got unexpected response from device 'b'E''
I use this command:
litex_term /dev/ttyUSB1 --serial-boot --kernel boot.bin

I don't have any experience loading things over serial. But loading
boot.bin to 0x40000000 is wrong, on Rocket it should be 0x80000000.

On Tue, Dec 06, 2022 at 12:20:35AM -0800, Mats Brorsson wrote:

Ok, I got progress with --with-spi-sdcard
[...]
Booting from boot.json...
boot.json file not found.
Booting from boot.bin...
Copying boot.bin to 0x80000000 (17920552 bytes)...
[########################################]
Executing booted program at 0x80000000
--============= Liftoff! ===============--
But it is still tuck at this stage and I will rebuild busybox, the kernel and
BBL to see if it helps.

That looks more promising. My guess is that there's a mismatch between
the "computer" and whatever specific parameters were used in building
the boot.bin image (wrong details in .dts/.dtb, missing config options
in the kernel, etc.)
There are some pre-built binaries in
https://github.com/litex-hub/linux-on-litex-rocket/issues/1
Maybe try one of them and see if it works for you -- that might help
narrow down which part of your own process needs more tuning...

The pre-built images did not work booting from an SD-card (because the SoC was not built for SPI, I presume). But thanks to your comment that I must load the boot image at 0x800000, I could specify that to litex_term and I am now loading your boot image serially which is horribly slow. I don't know if it will work.

On Tue, Dec 06, 2022 at 06:57:49AM -0800, Mats Brorsson wrote:

The pre-built images did not work booting from an SD-card (because the SoC was
not built for SPI, I presume). But thanks to your comment that I must load the
boot image at 0x800000, I could specify that to litex_term and I am now loading
your boot image serially which is horribly slow. I don't know if it will work.

It's been a while, but IIRC the nexys4ddr bitstream was built using
--with-ethernet --with-sdcard (note: not spi-sdcard!).

I have come as far as to figure out that the boot loader gets stuck right after calling the uart_sync()  in boot.c.
I have put a printout right before and right after, and this is the printout:
--============= Liftoff! ===============--
Before uart sync
Af

It should have printed After uart_sync instead of just Af .
As far as I can see the uart is set up properly and it can load a boot binary over the serial interface just right (with the same behaviour as when loading the file from the SD card.
Any pointers, please?
Also, is there a way to change the BIOS without re-building the entire SoC?

On Tue, Dec 13, 2022 at 11:51:10PM -0800, Mats Brorsson wrote:

Any pointers, please?

Sounds like you might have the wrong MMIO register address for the
UART somewhere in your DTS (check bootargs as well as the actual
liteuart node itself).

Also, is there a way to change the BIOS without re-building the entire SoC?

I think there might be a way, but I've never figured it out myself.
It probably involves loading the bios over the serial link with
litex_term, or something like that. @enjoy-digital might be able to
provide us with a better starting point...

But the BIOS works well. I can interact with it.

In the generated documentation the UART has address: 0x12004800 while in the .dts file (in the conf directory) it is 0x12006800.
I wonder how the bios worked as it goes through the uart as well. I will try to change the dts.

On Wed, Dec 14, 2022 at 07:16:42AM -0800, Mats Brorsson wrote:

I wonder how the bios worked as it goes through the uart as well.

The bios uses its own internal hard-coded MMIO addresses to interact
with the various peripherals. Linux comes with its own drivers, and
uses whatever addresses are provided to it via the DTB.
On typical hardware, the DTB itself is hard-coded inside the bios and
will always provide correct register addresses to Linux. That is not
(yet) the case with LiteX. There's a litex/tools/litex_json2dts_linux.py
helper script that should generate the DTS automatically, but it
hasn't yet been adapted to work with Rocket CPUs.
The current status-quo is that one would have to double-check if the
MMIO addresses generated during bitstream build (-csr-csv foo.csv)
match those in the DTS file, and update them if necessary.
Patching json2dts to teach it about Rocket is an item on my to-do list... :)

Thanks! That brought me one step further. The output now ends with:
bbl loader
              vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
                  vvvvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrrrr    vvvvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrrrrr      vvvvvvvvvvvvvvvvvvvvvv
rrrrrrrrrrrrr       vvvvvvvvvvvvvvvvvvvvvv
rr                vvvvvvvvvvvvvvvvvvvvvv
rr            vvvvvvvvvvvvvvvvvvvvvvvv      rr
rrrr      vvvvvvvvvvvvvvvvvvvvvvvvvv      rrrr
rrrrrr      vvvvvvvvvvvvvvvvvvvvvv      rrrrrr
rrrrrrrr      vvvvvvvvvvvvvvvvvv      rrrrrrrr
rrrrrrrrrr      vvvvvvvvvvvvvv      rrrrrrrrrr
rrrrrrrrrrrr      vvvvvvvvvv      rrrrrrrrrrrr
rrrrrrrrrrrrrr      vvvvvv      rrrrrrrrrrrrrr
rrrrrrrrrrrrrrrr      vv      rrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrr          rrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrr      rrrrrrrrrrrrrrrrrrrr
rrrrrrrrrrrrrrrrrrrrrr  rrrrrrrrrrrrrrrrrrrrrr

       INSTRUCTION SETS WANT TO BE FREE

Now it remains to see why it's stuck there.

On Wed, Dec 14, 2022 at 11:52:54AM -0800, Mats Brorsson wrote:

Now it remains to see why it's stuck there.

Means BBL is running, but Linux is still unhappy. Might want to try
enabling CONFIG_RISCV_SBI_V01 in your kernel .config, I've had reports
that it might make a difference.
I haven't used BBL in a while (in fact, I need to update the README
file with instructions on how to use opensbi instead). It may be that
CONFIG_RISCV_SBI_V01 used to be on by default in riscv defconfig, and
was disabled in the interim.

I enabled that flag, which did not really change anything. However, loading the bitstream from the USB instead of the SD-card made a difference and now it starts to boot Linux but hangs after:
[   15.994106] handlers:
[   15.996340] [<(____ptrval____)>] liteuart_interrupt
[   16.001204] Disabling IRQ #1

I have attached the build log of the bitstream and the full boot log. If you have time to look at it, I would appreciate it very much.
boot.log
build.log

For some reason, your kernel crashes while attempting to service a
UART interrupt. I've recently added IRQ support for LiteUART to
https://github.com/litex-hub/linux/tree/litex-rebase,
and it's been working better for me than in polling mode (which
used to be the only supported mode of operation).
If it's the latest litex-hub/litex-rebase kernel sources you're using,
you might try dropping the top-most commit ("serial: liteuart: add irq
support"), or commenting out the IRQ configuration from the uart's
DTS node:
https://github.com/litex-hub/linux-on-litex-rocket/blob/master/conf/nexys4ddr_fpu.dts#L110-L111
to force the uart back into polling-mode.

I will be trying that.
A question: when I set CONFIG_RISCV_SBI_V01=y I get two questions I do not really know what they are:
Early console using RISC-V SBI (SERIAL_EARLYCON_RISCV_SBI) [N/y/?] (NEW)
and
  RISC-V SBI console support (HVC_RISCV_SBI) [N/y/?] (NEW)
What is the proper answer to these?

I answered y to both of the questions before and with the next to last commit for the linux image, I can now boot to prompt.
Thanks for all the help.

On Thu, Dec 15, 2022 at 12:31:13PM -0800, Mats Brorsson wrote:

Early console using RISC-V SBI (SERIAL_EARLYCON_RISCV_SBI) [N/y/?] (NEW)
and
RISC-V SBI console support (HVC_RISCV_SBI) [N/y/?] (NEW)

Yes to both won't hurt -- it allows support for using ecalls into
machine mode where BBL itself will send/receive characters from the
UART. Instead of interacting with LiteUART itself (via MMIO register
reads and writes, and IRQs) the linux kernel can trap into machine
mode and let the hypervisor (BBL) deal with console i/o.
You'd have to modify your DTS (bootargs) accordingly, and probably
disable LiteUART driver support from Linux altogether as you wouldn't
actually need it anymore.
It's a deprecated option, so therefore not future-proof, but could be
useful to get something working in a hurry.

In the generated documentation the UART has address: 0x12004800 while in the .dts file (in the conf directory) it is 0x12006800. I wonder how the bios worked as it goes through the uart as well. I will try to change the dts.

Hello, @matsbror. I met the same issue with you, can you give me some help, thank you!
The printf worked before uart sync, while failed after uart sync.
I have checked the uart addresses in the generated csr.csv (0x12005800)
csr_base,ctrl,0x12000000,, csr_base,ddrphy,0x12000800,, csr_base,identifier_mem,0x12001000,, csr_base,leds,0x12001800,, csr_base,sdcard_block2mem,0x12002000,, csr_base,sdcard_core,0x12002800,, csr_base,sdcard_irq,0x12003000,, csr_base,sdcard_mem2block,0x12003800,, csr_base,sdcard_phy,0x12004000,, csr_base,sdram,0x12004800,, csr_base,timer0,0x12005000,, csr_base,uart,0x12005800,,
and .dts file (0x12005800).
`           bootargs = "console=liteuart earlycon=liteuart,0x12005800 rootwait root=/dev/ram0";
.......
liteuart0: serial@12005800 {
compatible = "litex,liteuart";
reg = <0x12005800 0x100>;
            status = "okay";
        };`

So  I am really confused about that. @gsomlo Did you patch 'json2dts' successfully? Can you give me some help, thank you!

On Wed, Jul 17, 2024 at 01:13:04AM -0700, xanxuso wrote:

So I am really confused about that. @gsomlo Did you patch 'json2dts'
successfully? Can you give me some help, thank you!

json2dts did get patched to a certain extent, but pasting in the
relevant CPU properties from the variant-appropriate
pythondata-cpu-rocket sample dts file is still a remaining challenge,
afaik.
the csr.csv data is the ultimate authority on the value of SoC MMIO
registers, so I'd recommend updating the .dts file to match those
numbers.
finally, after the latest update (commit b9b92a5), bbl support has
been deprecated in favor of opensbi. nexys-video, ecpix5, and
acorn-baseboard are supported, but it should be relatively easy to
adapt e.g. nexys-video.dts for nexys-ddr if that's the board you have.

Hi, @gsomlo.
I have made Linux work on the Rocket SOC.
Last week, I have checked all things that about csr.csv and .dts, but there are still no different or strange entries.
While in the other repository -- linux-on-litex-vexriscv, the whole process was very successful. In this repo, a new PLATFORM named 'litex/vexriscv' is applied instead of 'generic'. So I imitate this scheme and create a new platform 'rocket'. I just modified the FW_* in the object.mk and DEFAULT_UART_ADDR/DEFAULT_PLIC_ADDR/DEFAULT_CLINT_ADDR in the platform.c. After re-make, OpenSBI and Linux worked!
Here is the log,
rocket.log
However, I still have no idea why the platform/generic didn't work. Maybe you can check that and help me figure it out? Thank you!
Most importantly, I want to run Linux on the OpenC906. I have tried the same scheme as Rocket, but it stuck at Liftoff!!. The OpenSBI didn't work again. Can you help? It's also fine to just tell me some important positions to modify. Thank you!

On Fri, Jul 26, 2024 at 02:51:39AM -0700, xanxuso wrote:

However, I still have no idea why the platform/generic didn't work.

From the log, it appears you're loading the dtb as a separate,
explicit blob. That's probably ok (one valid way to do it). However,
with platform/generic, if you follow the new/updated
linux-on-litex-rocket instructions, I've been embedding the dtb into
the opensbi firmware, and making sure opensbi won't overwrite the
loaded kernel with it (using FW_JUMP_FDT_ADDR).
Honestly, it could be anything, there are many "moving parts" and it's
hard to imagine what went wrong without the ability to try and do it
myself on your specific board model...

Most importantly, I want to run Linux on the OpenC906. I have tried the same
scheme as Rocket, but it stuck at Liftoff!!. The OpenSBI didn't work again. Can
you help? It's also fine to just tell me some important positions to modify.

The important thing to keep in mind is that Rocket, unlike most (all?)
of the other RV64* cpu models supported with LiteX, is built as its
own SoC: its several cpu cores are connected together with an internal
interconnect (I think they call it TileLink), which also routes
memory, MMIO, and DMA over separate externally-facing axi ports, and,
in addition, has an internal L1 cache that is kept coherent in the
face of all the memory and DMA traffic to/from the outside.
Most other CPU models have a simpler architecture, and simply
"dropping one in" as a replacement to Rocket won't be enough to get
the same level of functionality out of it, so the answer to this is,
unfortunately, "It's Complicated"... :)
Replacing Rocket with another RV64GC litex core, while maintaining the
ability to boot Fedora on the resulting LiteX SoC, is an active goal I
have on my to-do list. I would strongly prefer that said replacement
core be written in [System]Verilog, and not in some Scala-derived
meta-language such as Chisel or Spinal, which causes long-term
maintainability and bus-factor risks...

Hi, @gsomlo.
Thank you for your help. I have updated the branch of 'opensbi' repository. Following the instruction with platform/generic, I got Linux work on the Rocket. Maybe there are some bugs in the previous branch. Here is the log
rocket.log
The next step, I replaced Rocket with OpenC906. In the simulation environment, it stuck at Boot HART MEDELEG without Linux info. Finally, I added CONFIG_ARCH_THEAD and CONFIG_ERRATA_THEAD in the linux_defconfig. After remake, Linux worked. Here is the log.
c906_sim.log
However, when I loaded bitstream to my board, it failed at f_mount(&fs, "", 1) in the sdcardboot step.
c906.log
But the board and the sacard is the same as Rocket used, which were verified. I added SDCARD_DEBUG and some printf info in the ff.c/mount_volume. The 'fmt = find_volume(fs, LD2PT(vol));' returns  fmt=3, which means "No FAT volume is found". But I have no idea why that, can you give me some suggestions? Thank you!

On Tue, Jul 30, 2024 at 03:11:24AM -0700, xanxuso wrote:

can you give me some suggestions?

Can you boot from the sdcard (as opposed, to e.g., netboot)?
If yes, this may be worth pursuing further. If not, chances
are that DMA isn't working properly (that whole dedicated
DMA port and pass-through routing I was talking about that
Rocketchip does)...

Hello, @gsomlo.
I can boot from serial or net. Here are the logs.
c906_netboot.log
c906_serialboot.log
However, when booting from sdcard, it still fails. As mentioned last time, rocket boot from sdcard successfully.

If not, chances are that DMA isn't working properly (that whole dedicated DMA port and pass-through routing I was talking about that Rocketchip does)

Can you explain it in detail or teach me where should be modified? Thank you very much!

Can you explain it in detail or teach me where should be modified ?

Here's how Rocket (and, generally, CPU "assemblies" that internally route DMA are wired into the overall LiteX SoC:
        --------------        ------------
        |        mem |<------>| LiteDRAM |
        |   Rocket   |        ------------
        | mmio   dma |
        --------------
           /\     ^
  LiteX WB ||     | Dedicated DMA
     Bus   \/     v     Bus
        ------------------
        | periph. (e.g., |
        | sdcard, sata,  |
        | etc.)          |
        ------------------

When rocket accesses registers (the specific memory region assigned to MMIO registers), it sends/receives data over the dedicated mmio port, which is wired to the "main" LiteX wishbone bus (via an AXI-to-WB adapter).
When a DMA capable peripheral initiates a DMA transfer, it occurs over a dedicated DMA bus, with the peripheral acting as master and Rocket's dedicated dma port as the slave. In this case, Rocket will route the traffic back out the dedicated mem port, and overall keep its internal L1 cache coherent with the state of DRAM.
finally, when rocket accesses main RAM, it happens directly over the dedicated mem <-> LiteDRAM AXI point-to-point link (this happens both when Rocket executes a load/store to the main RAM region, and also when a DMA transfer is initiated "through" Rocket by one of the peripherals).

In contrast, something like e.g., VexRiscV (and other cores that don't directly get involved in routing DMA) are wired up like this:
--------------
|            |  ------------
|  VexRiscV  |  | LiteDRAM |
|   i, d     |  ------------
--------------    ^
    ^  ^          |
    |  |          |
    v  v          v
========================= Common LiteX Wishbone Bus
   ^      ^
   |      |
   v      v
------------------
| periph. (e.g., |
| sdcard, sata,  |
| etc.)          |
------------------

The LiteX bus routes the CPU's instruction fetch and data read/write requests to the appropriate target (peripheral vs. main RAM), and also routes peripheral DMA master requests directly to LiteDRAM (which acts as the DMA slave).
When DMA happens, if the CPU core has any internal cache, it will fall out of coherence with LiteDRAM, and will need to
be flushed explicitly to avoid weird conflicts.
The place where this "wiring up" happens is here and here, and the place where rocket declares itself capable of internally routing mmio vs. memory vs. dma traffic separately over dedicated ports is here.
My advice would be to find an existing CPU model that is closest (in terms of one or the other of the above "wiring diagrams") to what you're trying to use, and ensure DMA-capable peripherals are also wired up appropriately, similarly to the existing model you're using as a starting point.

Thank you for your explanation, @gsomlo!
Sorry to trouble you about another question. When I build the opensbi firmware for Rocket with FW_TEXT_START=0x8000_0000, it stuck at Liftoff. While with FW_TEXT_START=0x0(default value), it worked and the SBI information printed "Firmware Base : 0x80000000", which means scratch->fw_start = 0x80000000. In fw_base.S, _scratch_init store _fw_start to scratch->fw_start:
lla	a4, _fw_start
sub	a5, t3, a4
REG_S	a4, SBI_SCRATCH_FW_START_OFFSET(tp)
REG_S	a5, SBI_SCRATCH_FW_SIZE_OFFSET(tp)

However, in fw_base.ldS, _fw_start should equal FW_TEXT_START=0x0:
. = FW_TEXT_START;
/* Don't add any section between FW_TEXT_START and _fw_start */
PROVIDE(_fw_start = .);

In the fw.md, FW_TEXT_START' defination is "the compile time address of the OpenSBI firmware". What's the difference between it and excuting address.
That's not all, FW_JUMP_ADDR should be 0x80200000. If _fw_start=0x0, it cannot be established.
fw_next_arg1:
#ifdef FW_JUMP_FDT_ADDR
	li	a0, FW_JUMP_FDT_ADDR
#elif defined(FW_JUMP_FDT_OFFSET)
	lla	a0, _fw_start
	li	a1, FW_JUMP_FDT_OFFSET
	add	a0, a0, a1
#else
	add	a0, a1, zero
#endif

So, is there something wrong with my understanding? Maybe _fw_start don't equal FW_TEXT_START?
I will appreciated it if you can answer above question, thank you.

On Thu, Aug 08, 2024 at 03:04:22AM -0700, xanxuso wrote:

Thank you for your explanation, @gsomlo!
Sorry to trouble you about another question. When I build the opensbi firmware
for Rocket with FW_TEXT_START=0x8000_0000, it stuck at Liftoff. While with
FW_TEXT_START=0x0(default value), it worked and the SBI information printed
"Firmware Base : 0x80000000", which means scratch->fw_start = 0x80000000. In
fw_base.S, _scratch_init store _fw_start to scratch->fw_start:
lla     a4, _fw_start
sub     a5, t3, a4
REG_S   a4, SBI_SCRATCH_FW_START_OFFSET(tp)
REG_S   a5, SBI_SCRATCH_FW_SIZE_OFFSET(tp)
However, in fw_base.ldS, _fw_start should equal FW_TEXT_START=0x0:
. = FW_TEXT_START;
/* Don't add any section between FW_TEXT_START and _fw_start */
PROVIDE(_fw_start = .);
In the fw.md, FW_TEXT_START' defination is "the compile time address of the
OpenSBI firmware". What's the difference between it and excuting address.
That's not all, FW_JUMP_ADDR should be 0x80200000. If _fw_start=0x0, it cannot
be established.
fw_next_arg1:
#ifdef FW_JUMP_FDT_ADDR
li      a0, FW_JUMP_FDT_ADDR
#elif defined(FW_JUMP_FDT_OFFSET)
lla     a0, _fw_start
li      a1, FW_JUMP_FDT_OFFSET
add     a0, a0, a1
#else
add     a0, a1, zero
#endif
So, is there something wrong with my understanding? Maybe _fw_start don't equal
FW_TEXT_START?
I will appreciated it if you can answer above question, thank you.

I'm not an expert on opensbi internals. If you look at how it's built
in the README, you'll see the only change (override) of the generic
platform's defaults is FW_JUMP_FDT_ADDR=0x82400000, which tells
opensbi to place its own re-processed version of the DTB at that
address, and thus avoids overwriting one of the other blobs (initrd
or kernel image), which are loaded according to boot.json.
For the simple busybox scenario, boot.json looks like this:
{
"initrd_bb":   "0x82000000",
"Image":       "0x80200000",
"fw_jump.bin": "0x80000000"
}
That means initrd can go from 0x82000000 all the way to 0x82400000
(0x400000 or 4194304 bytes, which is OK given the one I use is
826559 bytes).
When booting fedora, boot.json looks like this:
{
"initramfs.img": "0x83000000",
"Image": "0x80200000",
"fw_jump.bin": "0x80000000"
}
That means the kernel (much larger in Fedora than the custom one I
build for the busybox scenario) can go from 0x80200000 through
0x82400000, i.e. have a size of up to 0x2200000 or 35651584 bytes).
In either case, opensbi (with default-everything except for
FW_JUMP_FDT_ADDR) is expected to be loaded into RAM at 0x80000000,
and the litex bios should start executing it at that same (0x80000000)
address. Based on the original DTB that we build into opensbi during
compilation (and which it will process and clone to FW_JUMP_FDT_ADDR
before pointing the kernel at it), opensbi will know where the kernel
and initrd are in ram, and ensure they start properly.
If you want to know more than the above about opensbi, I suggest
emailing their list or opening an issue on their github -- the above
is most of what I know, and really all I needed to know about opensbi... :)


IE 7 and IE8 support clarified

In the docs it say grid, layout/ui and js support, does that mean that these browsers will display sites exactly the same as modern browsers do, or are there (what are they) some differences?
Best wishes
Lee

Hi Lee,
In my own testing I've discovered that since these browsers do not support media queries, not only is the grid layouts not supported but they often are incredibly broken. I don't think supporting these browsers is a high priority for zurb so I'm trying to find out javascript based solutions to these issues to get the older browsers in line with everything. Had planned on using Foundation to built an intranet for my company that worked on mobile and desktop nicely but am having so many issues with IE that I'm just going to have to build it from scratch :(

Hi Robin, for my site (first of many with Foundation I hope) I'm OK to have a conditional that tells IE7 to display the site fixed width, rather than get into the realms of respond.js and trickery like that to get media queries working.

@leeaston- Would you mind sharing your fixed width conditional statement that you use for IE 7? Thanks in advance.

< !--[if lte IE 7] >
< style >
.container {width:860px; margin:0 auto}
.p7MBM01h li { display: inline; }
< /style >
< ![endif]-- >

Brilliant! I'll give it a try. Thank you so much for sharing. :)


Fix unicode print error

Convert unicode string to byte string before printing.

Hm, thanks for the PR, but I'm not sure if this is 100% correct. For me, your change results in the following being printed, using Python 3.
b'\xe6\xb3\xa3'

Can you try setting: export PYTHONIOENCODING=UTF-8 as an environment variable? Does that solve your issue?

Ah... that's because the encode converts it to a byte string.
Yes. But isn't it better if the code workes even if the environment variable is not set?
My original fix was actually to set the default encoding of sys but I'm not sure if this is a good fix or not, that's why I've change it to io.open() for PR #96 .
import sys
reload(sys)
sys.setdefaultencoding('utf8')

Yes. But isn't it better if the code workes even if the environment variable is not set?

Definitely, but your change does not work in my environment ;) It should print a unicode string, but it doesn't. I am still not sure how to make it work in all environments.
Yeah, the original fix isn't great, also see http://stackoverflow.com/questions/3828723/why-should-we-not-use-sys-setdefaultencodingutf-8-in-a-py-script

Yup I agree, I'm thinking of writing a separate Unicode printing function but I'm not sure if its worth the effort to change all the prints to the custom version. XD

Yeah. There must be an easier/correct way to do this, I just don't know what it is...

I'm not sure how off-topic it is but, did you consider using unicode_literals (future) ?

I think unicode_literals is imported pretty much everywhere, but I don't think that's related since it only applies to literals defined in the code.

You might want to try using tf.compat.as_text(), which deals with this Python versioning ugliness.

I had issue with encoding when using ./bin/tools/generate_vocab.py
the solutions seems to be to use python3 ./bin/tools/generate_vocab.py instead.. probably the same for whole seq2seq training...


Using STRtree in multithreading causes segfaults

While implementing and testing a spatial join in dask-geopandas (https://github.com/geopandas/dask-geopandas/pull/54), I ran into a dying kernel (segfault) once in a while. And I was now able to boil it down into a small script that for me segfaults in at least 1 out of 2 runs.
I further reduced that script to not use dask but a plain ThreadPoolExecutor, which still reproduces the issue, see below (probably I could even further boil it down to just use pygeos.STRtree instead of calling geopandas.sjoin).
Running the script gives (circa 1 out of 2 runs):
$ python test_parallel_sjoin.py
double free or corruption (out)
Aborted (core dumped)

Running it inside gdb gives the following backtrace:

(gdb) run
Starting program: /home/joris/miniconda3/envs/geo-dev/bin/python test_parallel_sjoin.py
...
double free or corruption (out)

Thread 9 "python" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f75e9ffb700 (LWP 1371190)]
0x00007f761a32618b in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007f761a32618b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f761a305859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007f761a3703ee in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007f761a37847c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x00007f761a37a120 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x00007f7603cdc78b in void std::vector<geos::index::strtree::AbstractNode*, std::allocator<geos::index::strtree::AbstractNode*> >::_M_realloc_insert<geos::index::strtree::AbstractNode* const&>(__gnu_cxx::__normal_iterator<geos::index::strtree::AbstractNode**, std::vector<geos::index::strtree::AbstractNode*, std::allocator<geos::index::strtree::AbstractNode*> > >, geos::index::strtree::AbstractNode* const&) ()
   from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#6  0x00007f7603cdddd1 in geos::index::strtree::STRtree::createNode(int) () from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#7  0x00007f7603cd735a in geos::index::strtree::AbstractSTRtree::createParentBoundables(std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> >*, int) ()
   from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#8  0x00007f7603cdd79e in geos::index::strtree::STRtree::createParentBoundablesFromVerticalSlice(std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> >*, int) ()
   from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#9  0x00007f7603cde1bf in geos::index::strtree::STRtree::createParentBoundablesFromVerticalSlices(std::vector<std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> >*, std::allocator<std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> >*> >*, int) () from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#10 0x00007f7603cde426 in geos::index::strtree::STRtree::createParentBoundables(std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> >*, int) ()
   from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#11 0x00007f7603cd68e0 in geos::index::strtree::AbstractSTRtree::createHigherLevels(std::vector<geos::index::strtree::Boundable*, std::allocator<geos::index::strtree::Boundable*> >*, int) ()
   from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#12 0x00007f7603cd6881 in geos::index::strtree::AbstractSTRtree::build() () from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#13 0x00007f7603cd6de3 in geos::index::strtree::AbstractSTRtree::query(void const*, geos::index::ItemVisitor&) () from /home/joris/miniconda3/envs/geo-dev/lib/./libgeos-3.8.1.so
#14 0x00007f7603dc712a in GEOSSTRtree_query_r () from /home/joris/miniconda3/envs/geo-dev/lib/libgeos_c.so
#15 0x00007f7603b95edf in STRtree_query_bulk (self=0x7f75fd7ee180, args=<optimized out>) at src/strtree.c:488
#16 0x0000562ba1a993bc in method_vectorcall_VARARGS (func=<optimized out>, args=0x7f75f9ba3a88, nargsf=<optimized out>, kwnames=<optimized out>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Objects/descrobject.c:300
#17 0x0000562ba1b06e09 in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f75f9ba3a88, callable=<method_descriptor at remote 0x7f7603bd8310>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Include/cpython/abstract.h:127
#18 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x562ba6193f30) at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Python/ceval.c:4987
#19 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Python/ceval.c:3486
#20 0x0000562ba1ab1cd4 in _PyEval_EvalCodeWithName (_co=<code at remote 0x7f7603b08d40>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x0,
    kwargs=0x7f75f9ba4bc0, kwcount=<optimized out>, kwstep=1, defs=0x7f7603b28268, defcount=1, kwdefs=0x0, closure=0x0, name='query_bulk', qualname='STRtree.query_bulk')
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Python/ceval.c:4298
#21 0x0000562ba1ab2bb5 in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7f75f9ba4ba8, nargsf=<optimized out>, kwnames=<optimized out>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Objects/call.c:435
#22 0x0000562ba1a8ed65 in _PyObject_Vectorcall (kwnames=<optimized out>, nargsf=<optimized out>, args=0x7f75f9ba4ba8, callable=<function at remote 0x7f7603b2b280>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Include/cpython/abstract.h:127
#23 method_vectorcall (method=<optimized out>, args=0x7f75f9ba4bb0, nargsf=<optimized out>, kwnames=<optimized out>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Objects/classobject.c:60
#24 0x0000562ba1b0b518 in _PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x7f75f9ba4bb0, callable=<method at remote 0x7f75fda7d600>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Include/cpython/abstract.h:127
#25 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x562ba6193f30) at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Python/ceval.c:4987
#26 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Python/ceval.c:3469
#27 0x0000562ba1ab2049 in _PyEval_EvalCodeWithName (_co=<code at remote 0x7f76038fe2f0>, globals=<optimized out>, locals=<optimized out>, args=<optimized out>, argcount=<optimized out>, kwnames=0x7f75fdadf3d8,
    kwargs=0x7f75d8001440, kwcount=<optimized out>, kwstep=1, defs=0x7f76038fb518, defcount=2, kwdefs=0x0, closure=(<cell at remote 0x7f76038f6a00>,), name='query_bulk',
    qualname='PyGEOSSTRTreeIndex.query_bulk') at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Python/ceval.c:4298
#28 0x0000562ba1ab2c58 in _PyFunction_Vectorcall (func=<optimized out>, stack=0x7f75d8001430, nargsf=<optimized out>, kwnames=<optimized out>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Objects/call.c:435
#29 0x0000562ba1a8ed65 in _PyObject_Vectorcall (kwnames=<optimized out>, nargsf=<optimized out>, args=0x7f75d8001430, callable=<function at remote 0x7f7603900700>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Include/cpython/abstract.h:127
#30 method_vectorcall (method=<optimized out>, args=0x7f75d8001438, nargsf=<optimized out>, kwnames=<optimized out>)
    at /home/conda/feedstock_root/build_artifacts/python_1587713251558/work/Objects/classobject.c:60
#31 0x0000562ba1b07cce in _PyObject_Vectorcall (kwnames=('predicate', 'sort'), nargsf=<optimized out>, args=<optimized out>, callable=<method at remote 0x7f75fda7d300>)

where it seems that the memory corruption comes from inside creating the STRtree (AbstractSTRtree::build()), but I didn't yet further investigate (probably could use better tools, or a debug build of GEOS, etc).
Currently I am reproducing this with an environment based on conda-forge with Python 3.8, GEOS 3.8.1 and pygeos master (but also see it in an environment with GEOS 3.9.1 on Python 3.9, but I don't have gdb installed there, and the segfault message there is "free(): invalid pointer").
The test_parallel_sjoin.py script (it is using the "states and provinces" from NaturalEarth; I am not able to reproduce it with the smaller countries dataset included with geopandas):
from concurrent.futures import ThreadPoolExecutor
import itertools

import numpy as np
import pandas as pd
import geopandas

## Create data

# polygon data

gdf = geopandas.read_file("ne_10m_admin_1_states_provinces.zip")
# gdf = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres"))
# for purposes of the demo, take a subset of the columns
gdf = gdf[["name", "adm0_a3", "type_en", "geometry"]]
# and drop Antartica
gdf = gdf[gdf["adm0_a3"] != "ATA"]
# and convert to Mercator (don't do this at home for global area calculation!)
gdf = gdf.to_crs("EPSG:3857")

# point data (random points in bbox of polygon layer)

minx, miny, maxx, maxy = gdf.total_bounds
N = 1_000_000
df_points = geopandas.GeoDataFrame(
    {"id": np.arange(N)},
    geometry=geopandas.points_from_xy(minx + maxx * np.random.random(N), miny + maxy * np.random.random(N)),
    crs=gdf.crs
)

## Slice parts of the dataframes -> 4x4 => 16 combinations

n = int(len(gdf) / 4)
gdf_parts = [gdf[:n], gdf[n:2*n], gdf[2*n:3*n], gdf[3*n:]]

n = int(len(df_points) / 4)
df_points_parts = [df_points[:n], df_points[n:2*n], df_points[2*n:3*n], df_points[3*n:]]

## The function calling geopandas.sjoin / pygeos.STRtree in parallel

def thread_func(idxs):
    i, j = idxs
    left = df_points_parts[i]
    right = gdf_parts[j]
    return geopandas.sjoin(left, right, op="within")

def main():
    with ThreadPoolExecutor() as pool:
        res = list(pool.map(thread_func, itertools.product(range(4), range(4))))
        print(pd.concat(res))

if __name__ == "__main__":
    main()

A variant which only calls STRtree.query_bulk directly but not geopandas.sjoin doesn't seem to segfault

from concurrent.futures import ThreadPoolExecutor
import itertools

import numpy as np
import pandas as pd
import geopandas
import pygeos

## Create data

# polygon data

gdf = geopandas.read_file("/home/joris/scipy/ne_10m_admin_1_states_provinces.zip")
# gdf = geopandas.read_file(geopandas.datasets.get_path("naturalearth_lowres"))
# for purposes of the demo, take a subset of the columns
gdf = gdf[["name", "adm0_a3", "type_en", "geometry"]]
# and drop Antartica
gdf = gdf[gdf["adm0_a3"] != "ATA"]
# and convert to Mercator (don't do this at home for global area calculation!)
gdf = gdf.to_crs("EPSG:3857")

polygons = gdf.geometry.array.data

# point data (random points in bbox of polygon layer)

minx, miny, maxx, maxy = gdf.total_bounds
N = 1_000_000
points = pygeos.points(minx + maxx * np.random.random(N), miny + maxy * np.random.random(N))

## Slice parts of the dataframes -> 4x4 => 16 combinations

n = int(len(polygons) / 4)
polygons_parts = [polygons[:n], polygons[n:2*n], polygons[2*n:3*n], polygons[3*n:]]

n = int(len(points) / 4)
points_parts = [points[:n], points[n:2*n], points[2*n:3*n], points[3*n:]]

## The function calling geopandas.sjoin / pygeos.STRtree in parallel

def thread_func(idxs):
    i, j = idxs
    left = points_parts[i]
    right = polygons_parts[j]
    tree = pygeos.STRtree(left)
    return tree.query_bulk(right, predicate="contains")

def main():
    with ThreadPoolExecutor() as pool:
        res = list(pool.map(thread_func, itertools.product(range(4), range(4))))
        print(res)

if __name__ == "__main__":
    main()

From this line it seems to me that the geopandas.sjoin may cache the spatial index on the geodataframe. Could this be the difference between your geopandas snippet and pure pygeos snippet?
If the STRTree is cached on an object that is shared between threads, it is conceivable that two threads will call "the first" query() on the same STRTree. My first guess would be that GEOS can't handle that situation.

Ah, good observation! Thanks
And so if I add this small patch to force the build of the tree on initialization of STRtree (and not on first query), then the segfault goes away, which seems to confirm the suggested reason:
--- a/pygeos/strtree.py
+++ b/pygeos/strtree.py
@@ -58,6 +58,8 @@ class STRtree:
     def __init__(self, geometries, leafsize=10):
         self.geometries = np.asarray(geometries, dtype=np.object_)
         self._tree = lib.STRtree(self.geometries, leafsize)
+        # to trigger the build
+        self._tree.query(lib.Geometry("POINT(0 0)"), 0)

This could be fixed in GeoPandas by using "thread local" data for the _sindex attribute (https://docs.python.org/3/library/threading.html#thread-local-data). Pyproj did something similar for the underlying PROJ object on the pyproj.CRS class (https://github.com/pyproj4/pyproj/pull/793).
However, that means we would create a new tree for each thread, while I think that querying itself is actually supposed to be thread-safe? (should probably check this with GEOS devs) If querying itself it guaranteed to be thread safe, it would be nice to at least have the option to force the actual tree to already be built in the init.

This could be fixed in GeoPandas by using "thread local" data for the _sindex attribute (https://docs.python.org/3/library/threading.html#thread-local-data). Pyproj did something similar for the underlying PROJ object on the pyproj.CRS class (pyproj4/pyproj#793).
However, that means we would create a new tree for each thread, while I think that querying itself is actually supposed to be thread-safe? (should probably check this with GEOS devs) If querying itself it guaranteed to be thread safe, it would be nice to at least have the option to force the actual tree to already be built in the init.

I don't think it is good to use thread local storages unless absolutely necessary. This is actually a GEOS issue; the STRTree is not threadsafe before the first query is processed. I think the workaround you were doing in your example is better. We should do that (to force the tree to build) in the C code to make STRTree strictly threadsafe.

Yes, I reached out on the GEOS chat and looking into fixing it in GEOS as well (but on the short term ensuring it is already built would indeed be good)


Emotion classification using keras and building streamlit app for deployment!!

🚀 Feature
Emotion classification using keras and building streamlit app for future deployment.
Have you read the Contributing Guidelines on Pull Requests?
Yes
Motivation
The work that we build should be seen by others. Building streamlit app and deploying will ideally help !!

@SanjayMarreddi  can I go with this issue, please assign me this issue!!

@SanjayMarreddi  can I go with this issue, please assign me this issue!!

@bharath-acchu Assigned to you. You can start working. Good Luck !

@bharath-acchu Assigned to you. You can start working. Good Luck !


Login

Added in logging using Google Auth and setting the FIREBASE_TOKEN environmental variable.

By the way, even though I left comments, I went ahead and approved because I consider these comments pretty small and trust you to revise them :)