text:
Wait For Elements State disabled/enabled doesn't respect 10 sec wait time

Describe the bug
When using the function "Wait For Elements State"   enabled / disabled. It will fail frequently.
New message: Error: page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null at eval (eval at  (eval at callFunction (:304:29)), :3:17) at eval (eval at  (eval at callFunction (:304:29)), :3:26) at eval (eval at callFunction (:304:29), :4:78) at onRaf (:2087:37) at :2097:13 at InjectedScript._runAbortableTask (:2154:24) at InjectedScript.pollRaf (:2078:21) at eval (eval at callFunction (:304:29), :4:39) at UtilityScript.callFunction (:305:24) at UtilityScript. (:1:44) Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
It doesn't seem to respect the retry interval of 10seconds like with hidden or visible.
When I add "sleep 1s" before checking the state.... the check passes. But it would assume that robotframework-browser would do this when required (sleeping)
Found with v2.4.2

Some extra information.
*** Test Cases ***
UC1000-TC001 Maak van een string een base64 gecodeerde string
    New Browser    chromium    headless=false
    New Context
    New Page    https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2
    Wait For Elements State    id=myText      enabled

When I execute this I get the following (unexpected error)
Error: page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.

And here is the corresponding debug log

{"level":30,"time":"2021-01-06T16:32:08.887Z","pid":15020,"hostname":"<a host>","msg":"Listening on 53805"}
2021-01-06T16:32:09.115Z pw:api => browserType.launch started
2021-01-06T16:32:09.627Z pw:api <= browserType.launch succeeded
2021-01-06T16:32:09.652Z pw:api => browser.newContext started
2021-01-06T16:32:09.666Z pw:api <= browser.newContext succeeded
2021-01-06T16:32:09.666Z pw:api => browserContext.addInitScript started
2021-01-06T16:32:09.666Z pw:api <= browserContext.addInitScript succeeded
{"level":30,"time":"2021-01-06T16:32:09.667Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
2021-01-06T16:32:09.696Z pw:api => browserContext.newPage started
2021-01-06T16:32:09.971Z pw:api <= browserContext.newPage succeeded
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Video path: undefined"}
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:09.971Z pw:api => page.goto started
2021-01-06T16:32:09.973Z pw:api navigating to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2", waiting until "load"
2021-01-06T16:32:10.095Z pw:api   navigated to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2"
2021-01-06T16:32:10.241Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.296Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.391Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.391Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.478Z pw:api   navigated to "https://accounts.google.com/o/oauth2/iframe#origin=https%3A%2F%2Fwww.w3schools.com&rpcToken=447218133.8222313&clearCache=1"
2021-01-06T16:32:10.545Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.547Z pw:api   "load" event fired
2021-01-06T16:32:10.547Z pw:api <= page.goto succeeded
{"level":30,"time":"2021-01-06T16:32:10.557Z","pid":15020,"hostname":"<a host>","msg":"unparsed args: e => !e.disabled, id=myText, {}"}
2021-01-06T16:32:10.558Z pw:api => page.$ started
2021-01-06T16:32:10.575Z pw:api <= page.$ succeeded
2021-01-06T16:32:10.576Z pw:api => page.waitForFunction started
2021-01-06T16:32:10.588Z pw:api <= page.waitForFunction failed
================= Original suppressed error =================
page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
    at Connection.sendMessageToServer (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\connection.js:69:15)
    at Proxy.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:44:61)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:344:48
    at Frame._wrapApiCall (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:72:34)
    at Frame.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:341:21)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:60
    at Page._attributeToPage (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:202:20)
    at Page.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:21)
    at Object.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\index.js:70035:45)
    at step (c:\python37\lib\site-packages\Browser\wrapper\index.js:69941:23)
=============================================================
2021-01-06T16:32:10.598Z pw:api => page.screenshot started
2021-01-06T16:32:10.846Z pw:api <= page.screenshot succeeded
2021-01-06T16:32:10.856Z pw:api => page.title started
2021-01-06T16:32:10.858Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.862Z pw:api => page.bringToFront started
2021-01-06T16:32:10.864Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.867Z pw:api => page.title started
2021-01-06T16:32:10.868Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.880Z pw:api => page.bringToFront started
2021-01-06T16:32:10.881Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.883Z pw:api => browserContext.close started
2021-01-06T16:32:10.902Z pw:api <= browserContext.close succeeded
2021-01-06T16:32:10.933Z pw:api => browser.close started
2021-01-06T16:32:11.159Z pw:api <= browser.close succeeded

Some extra information.
*** Test Cases ***
UC1000-TC001 Maak van een string een base64 gecodeerde string
    New Browser    chromium    headless=false
    New Context
    New Page    https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2
    Wait For Elements State    id=myText      enabled

When I execute this I get the following (unexpected error)
Error: page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.

And here is the corresponding debug log

{"level":30,"time":"2021-01-06T16:32:08.887Z","pid":15020,"hostname":"<a host>","msg":"Listening on 53805"}
2021-01-06T16:32:09.115Z pw:api => browserType.launch started
2021-01-06T16:32:09.627Z pw:api <= browserType.launch succeeded
2021-01-06T16:32:09.652Z pw:api => browser.newContext started
2021-01-06T16:32:09.666Z pw:api <= browser.newContext succeeded
2021-01-06T16:32:09.666Z pw:api => browserContext.addInitScript started
2021-01-06T16:32:09.666Z pw:api <= browserContext.addInitScript succeeded
{"level":30,"time":"2021-01-06T16:32:09.667Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
2021-01-06T16:32:09.696Z pw:api => browserContext.newPage started
2021-01-06T16:32:09.971Z pw:api <= browserContext.newPage succeeded
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Video path: undefined"}
{"level":30,"time":"2021-01-06T16:32:09.971Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:09.971Z pw:api => page.goto started
2021-01-06T16:32:09.973Z pw:api navigating to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2", waiting until "load"
2021-01-06T16:32:10.095Z pw:api   navigated to "https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_text_disabled2"
2021-01-06T16:32:10.241Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.296Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.391Z pw:api   navigated to "about:blank"
2021-01-06T16:32:10.391Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.478Z pw:api   navigated to "https://accounts.google.com/o/oauth2/iframe#origin=https%3A%2F%2Fwww.w3schools.com&rpcToken=447218133.8222313&clearCache=1"
2021-01-06T16:32:10.545Z pw:api   "domcontentloaded" event fired
2021-01-06T16:32:10.547Z pw:api   "load" event fired
2021-01-06T16:32:10.547Z pw:api <= page.goto succeeded
{"level":30,"time":"2021-01-06T16:32:10.557Z","pid":15020,"hostname":"<a host>","msg":"unparsed args: e => !e.disabled, id=myText, {}"}
2021-01-06T16:32:10.558Z pw:api => page.$ started
2021-01-06T16:32:10.575Z pw:api <= page.$ succeeded
2021-01-06T16:32:10.576Z pw:api => page.waitForFunction started
2021-01-06T16:32:10.588Z pw:api <= page.waitForFunction failed
================= Original suppressed error =================
page.waitForFunction: Evaluation failed: TypeError: Cannot read property 'disabled' of null
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:17)
    at eval (eval at <anonymous> (eval at callFunction (:304:29)), <anonymous>:3:26)
    at eval (eval at callFunction (:304:29), <anonymous>:4:78)
    at onRaf (<anonymous>:2087:37)
    at <anonymous>:2097:13
    at InjectedScript._runAbortableTask (<anonymous>:2154:24)
    at InjectedScript.pollRaf (<anonymous>:2078:21)
    at eval (eval at callFunction (:304:29), <anonymous>:4:39)
    at UtilityScript.callFunction (<anonymous>:305:24)
    at UtilityScript.<anonymous> (<anonymous>:1:44)
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
    at Connection.sendMessageToServer (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\connection.js:69:15)
    at Proxy.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:44:61)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:344:48
    at Frame._wrapApiCall (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\channelOwner.js:72:34)
    at Frame.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\frame.js:341:21)
    at c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:60
    at Page._attributeToPage (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:202:20)
    at Page.waitForFunction (c:\python37\lib\site-packages\Browser\wrapper\node_modules\playwright\lib\client\page.js:454:21)
    at Object.<anonymous> (c:\python37\lib\site-packages\Browser\wrapper\index.js:70035:45)
    at step (c:\python37\lib\site-packages\Browser\wrapper\index.js:69941:23)
=============================================================
2021-01-06T16:32:10.598Z pw:api => page.screenshot started
2021-01-06T16:32:10.846Z pw:api <= page.screenshot succeeded
2021-01-06T16:32:10.856Z pw:api => page.title started
2021-01-06T16:32:10.858Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.862Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.862Z pw:api => page.bringToFront started
2021-01-06T16:32:10.864Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.867Z pw:api => page.title started
2021-01-06T16:32:10.868Z pw:api <= page.title succeeded
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active context"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changing current active page"}
{"level":30,"time":"2021-01-06T16:32:10.880Z","pid":15020,"hostname":"<a host>","msg":"Changed active page"}
2021-01-06T16:32:10.880Z pw:api => page.bringToFront started
2021-01-06T16:32:10.881Z pw:api <= page.bringToFront succeeded
2021-01-06T16:32:10.883Z pw:api => browserContext.close started
2021-01-06T16:32:10.902Z pw:api <= browserContext.close succeeded
2021-01-06T16:32:10.933Z pw:api => browser.close started
2021-01-06T16:32:11.159Z pw:api <= browser.close succeeded

This is true, if there error in Pleywright side Browser library does not retry, instead the above error is shown. I think it is not correct and we should fix it.

This is true, if there error in Pleywright side Browser library does not retry, instead the above error is shown. I think it is not correct and we should fix it.

I looked at this problem.
I had the following xpath selector: //*[@id='ordernumber'] to select an input html element(Not there is only 1 element that matches this xpath (when using chrome browser)
When I did this:
Browser.Wait For Elements State    //*[@id='ordernumber']     disabled
I got an error message (as seen above) and the test fails
When I change the selector to '//index[@id='ordernumber']', the check is performed correctly.
I don't know if this a problem in robotframework-browser or playwright.
Does robotframework-browser accept all normal xpath queries ? Or are there any restrictions ?

I looked at this problem.
I had the following xpath selector: //*[@id='ordernumber'] to select an input html element(Not there is only 1 element that matches this xpath (when using chrome browser)
When I did this:
Browser.Wait For Elements State    //*[@id='ordernumber']     disabled
I got an error message (as seen above) and the test fails
When I change the selector to '//index[@id='ordernumber']', the check is performed correctly.
I don't know if this a problem in robotframework-browser or playwright.
Does robotframework-browser accept all normal xpath queries ? Or are there any restrictions ?

Please ignore previous solution.
I have tested this in Ride before placing 'solution' above.
I'm sure it worked, but know I see the problem again with //input ....  xpath selector
I don't understand this, but please ignore this solution

Please ignore previous solution.
I have tested this in Ride before placing 'solution' above.
I'm sure it worked, but know I see the problem again with //input ....  xpath selector
I don't understand this, but please ignore this solution

I thought I was losing my marbles.... but now I see what causes the problem.
When using robotframework-browser HEADLESS checking if a field is disabled/enabled fails.
It doesn't matter if //*[@Id="someId"] or //input[@Id="someId"] is used.
When running robotframework-browser with a visible browser checking if the fields is 98 % accurate. Mostly it works, and 1 out of 10 it will still fail.
So I think the library or playwright is acting differently when in headless mode

I thought I was losing my marbles.... but now I see what causes the problem.
When using robotframework-browser HEADLESS checking if a field is disabled/enabled fails.
It doesn't matter if //*[@Id="someId"] or //input[@Id="someId"] is used.
When running robotframework-browser with a visible browser checking if the fields is 98 % accurate. Mostly it works, and 1 out of 10 it will still fail.
So I think the library or playwright is acting differently when in headless mode

It's common or not unusual that browser or applications running in the browser might behave differently when running in headless mode. Example PDF preview doesn't work in headless mode and there have been several reports in SeleniumLibrary side from similar cases.
But there is a bug in the Browser library that we don't respect the timeout if there is exception in playwright side.

It's common or not unusual that browser or applications running in the browser might behave differently when running in headless mode. Example PDF preview doesn't work in headless mode and there have been several reports in SeleniumLibrary side from similar cases.
But there is a bug in the Browser library that we don't respect the timeout if there is exception in playwright side.

@aaltat ,
Anny chance that this problem in the browser library will be fixed soon?
Greets Erik

nice. RoboCon has some interesting topics !!
Can anyone attend these meetings ? I assume it will be all online due to the pandemic

Tickets are available at https://robocon.io/ Getting tickets will support Robot Framework development

@aaltat
Thanks. I had a few test failing because of this. A way to fix this is to use "Wait For Network Is Idle' before the check on field to be disabled/enabled.
I was able to remove this when using browser 4.5.0. !!

@aaltat
I spoke too soon
I still have problems to check state disabled when page is refreshed, or a button triggers a change on the page.
Here are some debug logs:
Most of the time the test (which performs a "Wait For Elements State    disabled, after a click on a button) fails. Mostly when using robotframework-browser headless. When using browser with visible browser the test sometimes works. Hope this helps in finding the problem. (tested with robotframework-browser 4.5.0)
playwright-log-headless-error.txt
playwright-log-visible-error.txt
playwright-log-visible-noerror.txt

4.5.0 doesn't have the fix, next release will have. If you want to try this fix, you need install from the repository directly.

Sorry for that. Because the issue was closed I assumed the fix was in the
4.5.0 release.
Any idea when the release will be released which contains the fix?
Greets Erik
On Thu, May 13, 2021, 20:31 Tatu Aalto @.***> wrote:

4.5.0 doesn't have the fix, next release will have. If you want to try
this fix, you need install from the repository directly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MarketSquare/robotframework-browser/issues/629#issuecomment-840748912,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARLATWMDAA6KJW4BQFDEEK3TNQLI3ANCNFSM4VTH3AHA
.

Most likely we will push release out in next week.

Euh.
Isn't it in release 4.5.2?
Greets
On Sun, May 16, 2021, 16:41 Tatu Aalto @.***> wrote:

Most likely we will push release out in next week.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MarketSquare/robotframework-browser/issues/629#issuecomment-841826758,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ARLATWJZ74U5NVJYIUGQYNDTN7KRXANCNFSM4VTH3AHA
.

Ah, true. I did forget that it was released.

authors: aaltat emakaay

repo: MarketSquare/robotframework-browser


text:
ValueError: /tasks not found in paths section of the OpenAPI document.

Hi,
I am trying OpenApiDriver against a simple openapi with 5 endpoints and though 9 tests are generated, only the first 3 pass.
The remaining 6 all fail with "ValueError: /tasks not found in paths section of the OpenAPI document."
I have no idea what this means. I have changed parameters to {id} to avoid the need of a mapping, but I am affraid I would need one but since I do not really understand the issue I do not know how to write that maping.
Can you help ? Thanks
Here is the python fastapi server:
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import List

app = FastAPI()

# Pydantic model for task (excluding 'id')
class TaskCreate(BaseModel):
    title: str
    description: str
    done: bool

class Task(TaskCreate):
    id: int

# Create a list to store tasks
tasks = []

# Endpoint to create a new task
@app.post("/tasks/", response_model=Task)
def create_task(task: TaskCreate):
    task_dict = task.dict()
    task_dict['id'] = len(tasks) + 1
    new_task = Task(**task_dict)
    tasks.append(new_task)
    return new_task

# Endpoint to update a task by its ID
@app.put("/tasks/{id}/", response_model=Task)
def update_task(id: int, updated_task: TaskCreate):
    if id < 1 or id > len(tasks):
        raise HTTPException(status_code=404, detail="Task not found")

    task = tasks[id - 1]
    task.title = updated_task.title
    task.description = updated_task.description
    task.done = updated_task.done
    return task

# Endpoint to delete a task by its ID
@app.delete("/tasks/{id}/", response_model=Task)
def delete_task(id: int):
    if id < 1 or id > len(tasks):
        raise HTTPException(status_code=404, detail="Task not found")

    task = tasks.pop(id - 1)
    return task

# Endpoint to retrieve a list of all tasks
@app.get("/tasks/", response_model=List[Task])
def get_tasks():
    return tasks

# Endpoint to retrieve a task by its ID
@app.get("/tasks/{id}/", response_model=Task)
def get_task(id: int):
    if id < 1 or id > len(tasks):
        raise HTTPException(status_code=404, detail="Task not found")

    task = tasks[id - 1]
    return task

if __name__ == "__main__":
    import uvicorn

    uvicorn.run(app, host="0.0.0.0", port=8000)

and the generated openapi:
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/tasks/":{"get":{"summary":"Get Tasks","operationId":"get_tasks_tasks__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Task"},"type":"array","title":"Response Get Tasks Tasks  Get"}}}}}},"post":{"summary":"Create Task","operationId":"create_task_tasks__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/{id}/":{"get":{"summary":"Get Task","operationId":"get_task_tasks__id___get","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Task","operationId":"update_task_tasks__id___put","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Task","operationId":"delete_task_tasks__id___delete","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Task":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"done":{"type":"boolean","title":"Done"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["title","description","done","id"],"title":"Task"},"TaskCreate":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"done":{"type":"boolean","title":"Done"}},"type":"object","required":["title","description","done"],"title":"TaskCreate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}

and I used the robot test from the readme.

I think there's an issue in the path parser that I need to look into, but I expect that changing get and post to "/tasks" (instead of "/tasks/") will resolve the issue. Trailing /'s in urls are really a pain...it basically means that "there is a next part of this route and it's nothing".

From: phramusca @.>
Sent: Tuesday, October 24, 2023 5:03:47 PM
To: MarketSquare/robotframework-openapidriver @.>
Cc: Subscribed @.***>
Subject: [MarketSquare/robotframework-openapidriver] ValueError: /tasks not found in paths section of the OpenAPI document. (Issue #35)
Hi,
I am trying OpenApiDriver against a simple openapi with 5 endpoints and though 9 tests are generated, only the first 3 pass.
The remaining 6 all fail with "ValueError: /tasks not found in paths section of the OpenAPI document."
I have no idea what this means. I have changed parameters to {id} to avoid the need of a mapping, but I am affraid I would need one but since I do not really understand the issue I do not know how to write that maping.
Can you help ? Thanks
Here is the python fastapi server:
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import List
app = FastAPI()
Pydantic model for task (excluding 'id')
class TaskCreate(BaseModel):
title: str
description: str
done: bool
class Task(TaskCreate):
id: int
Create a list to store tasks
tasks = []
Endpoint to create a new task
@app.post("/tasks/", response_model=Task)
def create_task(task: TaskCreate):
task_dict = task.dict()
task_dict['id'] = len(tasks) + 1
new_task = Task(**task_dict)
tasks.append(new_task)
return new_task
Endpoint to update a task by its ID
@app.put("/tasks/{id}/", response_model=Task)
def update_task(id: int, updated_task: TaskCreate):
if id < 1 or id > len(tasks):
raise HTTPException(status_code=404, detail="Task not found")
task = tasks[id - 1]
task.title = updated_task.title
task.description = updated_task.description
task.done = updated_task.done
return task

Endpoint to delete a task by its ID
@app.delete("/tasks/{id}/", response_model=Task)
def delete_task(id: int):
if id < 1 or id > len(tasks):
raise HTTPException(status_code=404, detail="Task not found")
task = tasks.pop(id - 1)
return task

Endpoint to retrieve a list of all tasks
@app.get("/tasks/", response_model=List[Task])
def get_tasks():
return tasks
Endpoint to retrieve a task by its ID
@app.get("/tasks/{id}/", response_model=Task)
def get_task(id: int):
if id < 1 or id > len(tasks):
raise HTTPException(status_code=404, detail="Task not found")
task = tasks[id - 1]
return task

if name == "main":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)

and the generated openapi:
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/tasks/":{"get":{"summary":"Get Tasks","operationId":"get_tasks_tasks__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Task"},"type":"array","title":"Response Get Tasks Tasks  Get"}}}}}},"post":{"summary":"Create Task","operationId":"create_task_tasks__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/{id}/":{"get":{"summary":"Get Task","operationId":"get_task_tasks__id___get","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Task","operationId":"update_task_tasks__id___put","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Task","operationId":"delete_task_tasks__id___delete","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Task":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"done":{"type":"boolean","title":"Done"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["title","description","done","id"],"title":"Task"},"TaskCreate":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"done":{"type":"boolean","title":"Done"}},"type":"object","required":["title","description","done"],"title":"TaskCreate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
and I used the robot test from the readme.
—
Reply to this email directly, view it on GitHubhttps://github.com/MarketSquare/robotframework-openapidriver/issues/35, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CMZO3HACUG3MRX557YHDYA7KFHAVCNFSM6AAAAAA6N3IOQGVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2TSNBXGY4DCMI.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

Good catch ! I removed the trailing slash on all endpoints and now I have the tests pass.
It would be good to manage trailing slashes though...
Thanks
----- Mail original -----
De: "Robin" @.>
À: "MarketSquare/robotframework-openapidriver" @.>
Cc: "phramusca" @.>, "Author" @.>
Envoyé: Mardi 24 Octobre 2023 17:25:13
Objet: Re: [MarketSquare/robotframework-openapidriver] ValueError: /tasks not found in paths section of the OpenAPI document. (Issue #35)
I think there's an issue in the path parser that I need to look into, but I expect that changing get and post to "/tasks" (instead of "/tasks/") will resolve the issue. Trailing /'s in urls are really a pain...it basically means that "there is a next part of this route and it's nothing".

From: phramusca @.>
Sent: Tuesday, October 24, 2023 5:03:47 PM
To: MarketSquare/robotframework-openapidriver @.>
Cc: Subscribed @.***>
Subject: [MarketSquare/robotframework-openapidriver] ValueError: /tasks not found in paths section of the OpenAPI document. (Issue #35)
Hi,
I am trying OpenApiDriver against a simple openapi with 5 endpoints and though 9 tests are generated, only the first 3 pass.
The remaining 6 all fail with "ValueError: /tasks not found in paths section of the OpenAPI document."
I have no idea what this means. I have changed parameters to {id} to avoid the need of a mapping, but I am affraid I would need one but since I do not really understand the issue I do not know how to write that maping.
Can you help ? Thanks
Here is the python fastapi server:
from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import List
app = FastAPI()
Pydantic model for task (excluding 'id')
class TaskCreate(BaseModel):
title: str
description: str
done: bool
class Task(TaskCreate):
id: int
Create a list to store tasks
tasks = []
Endpoint to create a new task
@app.post("/tasks/", response_model=Task)
def create_task(task: TaskCreate):
task_dict = task.dict()
task_dict['id'] = len(tasks) + 1
new_task = Task(**task_dict)
tasks.append(new_task)
return new_task
Endpoint to update a task by its ID
@app.put("/tasks/{id}/", response_model=Task)
def update_task(id: int, updated_task: TaskCreate):
if id < 1 or id > len(tasks):
raise HTTPException(status_code=404, detail="Task not found")
task = tasks[id - 1]
task.title = updated_task.title
task.description = updated_task.description
task.done = updated_task.done
return task
Endpoint to delete a task by its ID
@app.delete("/tasks/{id}/", response_model=Task)
def delete_task(id: int):
if id < 1 or id > len(tasks):
raise HTTPException(status_code=404, detail="Task not found")
task = tasks.pop(id - 1)
return task
Endpoint to retrieve a list of all tasks
@app.get("/tasks/", response_model=List[Task])
def get_tasks():
return tasks
Endpoint to retrieve a task by its ID
@app.get("/tasks/{id}/", response_model=Task)
def get_task(id: int):
if id < 1 or id > len(tasks):
raise HTTPException(status_code=404, detail="Task not found")
task = tasks[id - 1]
return task
if name == "main":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
and the generated openapi:
{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/tasks/":{"get":{"summary":"Get Tasks","operationId":"get_tasks_tasks__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Task"},"type":"array","title":"Response Get Tasks Tasks Get"}}}}}},"post":{"summary":"Create Task","operationId":"create_task_tasks__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tasks/{id}/":{"get":{"summary":"Get Task","operationId":"get_task_tasks__id___get","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Task","operationId":"update_task_tasks__id___put","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Task","operationId":"delete_task_tasks__id___delete","parameters":[{"required":true,"schema":{"type":"integer","title":"Id"},"name":"id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Task":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"done":{"type":"boolean","title":"Done"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["title","description","done","id"],"title":"Task"},"TaskCreate":{"properties":{"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"done":{"type":"boolean","title":"Done"}},"type":"object","required":["title","description","done"],"title":"TaskCreate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
and I used the robot test from the readme.
—
Reply to this email directly, view it on GitHubhttps://github.com/MarketSquare/robotframework-openapidriver/issues/35, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AK3CMZO3HACUG3MRX557YHDYA7KFHAVCNFSM6AAAAAA6N3IOQGVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2TSNBXGY4DCMI.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
—
Reply to this email directly, view it on GitHub , or unsubscribe .
You are receiving this because you authored the thread. Message ID: <MarketSquare/robotframework-openapidriver/issues/35/1777479148 @ github . com>

I've released a first version of the repo that brings OpenApiDriver and OpenApiLibCore together in a single package. I've implemented a possible solution to this issue in there, but I haven't been able to test it in detail. If you're willing, you could take a look: https://pypi.org/project/robotframework-openapitools/
Note that if you install openapitools, you should remove openapidriver / openapi-libcore from the project / environment; this is due to the fact that openapitools is a drop-in replacement for both, so it contains both OpenApiDriver and OpenApiLibCore.

source: gharchive/issue

authors: phramusca robinmackaij

license_type: permissive

license_source: github-api


text:
Enhancement: RenameVariables transformer

We have a requirement to bulk-replace variables, and wondered if we can leverage Robotidy for this.. Simplified test case shown below, our goal would be to replace the variables OLD_SCALAR by NEW_SCALAR, OLD by NEW, OLD_DICT by NEW_DICT, and also OLD_DICT_2 by NEW_DICT_2, but also its keys old_key1 by new_key1.. Obviously this example could also be achieved through regexp substitution, but we would like to explore if Robotidy could do it "better" and "more robust" than a potentially complex regexp.
Really appreciate you looking into this!

*** Test Cases ***
Test
    Import Variables    ${CURDIR}/vars.yaml
    Log Variables
    FOR   ${var}   IN   @{OLD}
        Log   ${var}
    END

    Should Be True   ${OLD_SCALAR}
    Should Be True   ${OLD}
    Should be True   ${OLD}[1]
    Should be True   ${OLD_DICT.a}
    Should be True   ${OLD_DICT}[a]
    Should be True   ${OLD_DICT_2.old_key1}
    Should be True   ${OLD_DICT_2}[old_key1]

    Do something with ${OLD}
    Do something with ${OLD}[1]
    Do something with ${OLD_DICT.a}
    Do something with ${OLD_DICT}[a]
    Do something with ${OLD_DICT_2.old_key1}
    Do something with ${OLD_DICT_2}[old_key1]

*** Keywords ***
Do something with ${var}
    Log   ${var}

vars.yaml content:
OLD_SCALAR: 1

OLD:
- 1
- 2
- 3

OLD_DICT:
  a: 1
  b: 1
  c: 1

OLD_DICT_2:
  old_key1: 1
  old_key2: 2

I apologize for the late reply. This feature wasn't possible before but now with #502 in open PRs we will have all tools available to implement it (new transformer is named RenameVariables but does not rename it like you want, just normalize the name and the scope of variable). After this time you probably don't need it anymore but it may be useful in the future (and also for the others) so I will work on that in the future releases.
It will work similarly to RenameKeywords/RenameTestCases. However I'm thinking about adding reading from the file to allow bulk renaming.
You mentioned vars.yaml file, do you also expect to have your variables renamed here? It could be more tricky than just renaming variables in the robot files.

Hi @bhirsz ! Thanks for getting back to me.. I am still looking for this capability, so still looking forward to it ;-)
I only included the vars.yaml to illustrate what the variable values for my examples would be.. Of course I would not expect tidy to touch .yaml files ;-)

authors: bhirsz oboehmer

repo: MarketSquare/robotframework-tidy


text:
thanks .perferct .but I want to know whether we can share Buffer(without copy)

thanks .perferct

No, that's not possible as the shared memory block is assigned by the OS, thus, your data needs to be copied into that buffer for it to be accessible

sir can you tell me how to use record struct?

The easiest way of creating and using a shared memory block would be like this:
Host code
import shared_memory from '@markusjx/shared_memory';

// Generate a memory id
const id = shared_memory.generateId();

// Create a new shared memory block
// with a size of 1024 bytes
const memory = new shared_memory(id, 1024, false, true);

// Write data to the memory
memory.data = "Hello World";

// Signal the client that the data is ready

Client code
import shared_memory from '@markusjx/shared_memory';

// Attach the created memory
const memory = new shared_memory(id, 1024, false, false);

// Wait until the data is ready

// Read the data
const read = memory.data;

console.log(read); // Hello World

Closing due to inactivity

license: MIT


text:
[SUGGESTION] Custom Themes Resource

First of all, I must say that you have a wonderful application here. GPMDP is very well made, and I'm glad to say that I will be using it nearly daily.
I have spent a while Googling for custom themes for this app, however all I have been able to find are themes that too closely resemble the built-in dark theme. I would like to suggest a place where people can upload all their themes for convenience or a place where people can request for a theme to be made. This would make it easier for users to find themes for the application and you could possibly integrate it within GPMDP in the future for ease of access.

I would suggest making your theme a gist here on github and adding it to our wiki with a screenshot:
https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/wiki/Themes

This is not something we're going to build (a repository of themes), if you want to put your theme on the Wiki by all means do.

authors: MarshallOfSound jostrander sks316

license: mit

license_source: bigquery


text:
Added English (UK)

Also fixed a small error in US

Coverage remained the same at 77.261% when pulling a60720d08d6f04ebe141163e1813e762f6b1e186 on GreenTurtwig:englishUK into 17ecd25f212703111622d1bbdf75f76ddb66cb15 on MarshallOfSound:master.

Coverage remained the same at 77.261% when pulling 1ef25ca00481407828ec0dcd23d3ebca839aa1ca on GreenTurtwig:englishUK into 17ecd25f212703111622d1bbdf75f76ddb66cb15 on MarshallOfSound:master.

In general I don't like this much duplicate, pretty much all the strings are the same as en-US which makes adding new strings just that much more annoying.
I would suggest instead modifying TranslationProvider to accept js files aswell and simply use Object.assign() to override the few object properties you want to change for UK

This PR is stale, closing.

source: gharchive/pull-request

authors: GreenTurtwig MarshallOfSound coveralls jostrander


text:
unit test coverage need to be more aggressive in the UI module

https://github.com/Marzona/rig-remote/issues/47 proves that we lack unit test on the UI module (or what that module contains now).
We need to cover the UI features of this tool with tests for making sure that all the parameters inserted in the UI are managed properly.

we are good as of now, and since there is the plan to re-design the UI...

repo: Marzona/rig-remote


text:
MassTransit.Analyzers should not interfere with projects that don't depend on MT

Hi.
I have a solution with multiple projects where we reference the analyzers in a MSBuild Directory.Build.props file.
This makes it so that all projects share the same analyzers. When trying to add MassTransit.Analyzers globally to all my projects, I discovered it throws when it tries to (incorrectly?) analyze an expression outside of a Publish/GetResponse, etc method.
I manage to create a test that reproduces the issue which is what this PR includes.
If we define how we should handle these cases I'll be happy to give the implementation a go, although I've never written an analyzer.
I think there are two things that we may cover:

The analyzer shouldn't be considering the code's test as something to analyze since it is not an Anonymous object used in the context of sending a message (not 100% sure this is correct tho)
We shouldn't even attempt to analyze anything if the target project doesn't depend on MassTransit (how does this work with transitive dependencies? I think Compilation has the complete list of References, but not sure)

I was thinking there should be a quick way to "skip" projects that don't reference any MassTransit.* package?
I did have to change a bit the testing infrastructure in order to be able to create a testing scenario that doesn't include the dependency to MassTransit packages.
Feel free to edit/rename/etc.
Leo.

Resolved it, thanks!

Hey @phatboyg ! Thank you!
Would you point me into the commit/s where you've fixed it? :)
Thanks again!!

https://github.com/phatboyg/MassTransit/commit/40f7c49dcf26e48a6f752038eaaf9d10c97e9ec3

Hey thanks Chris. Didn't notice to check your fork :)
Quoting from my post:

If we define how we should handle these cases I'll be happy to give the implementation a go, although I've never written an analyzer.

Just wanted to let you know that I'm willing to help if it's something that I'm capable of fixing! Hoping it won't be my only PR so feel free to just point me in the right direction the next time :+1: :+1:

authors: leonardochaia phatboyg

repo: MassTransit/MassTransit


text:
Feature/publishing exceptions documentation

Moving the documentation in the publishing section

@phatboyg any updates on this?


text:
Add contributing file

What does this implement/fix?
Fixes #47
What does this PR do? Beautify, add new feature, bug fix? What does it change?
Solves an issue
Does this close any currently open issues?
If it solves an issue, mention it's number
#47
Explain your workflow
What steps/decisions did you take to reach the current state of PR.
I forked, and made a new feature branch.
Added CONTRIBUTING.md file
then created a new PR
Any other comments?
Anything else you feel we should know.

@jclopezdev Excellent! Merging it! Thanks for your help! :heart:

authors: MatheusRich jclopezdev

repo: MatheusRich/dontfile


text:
🛑 Doctor-arganaraz is down

In 85a95b5, Doctor-arganaraz (http://www.doctor-arganaraz.com.ar) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Doctor-arganaraz is back up in f4ae769 after 17 minutes.


text:
🛑 Inventario App is down

In 4dfea49, Inventario App (https://inventario.voluntariosgreenpeace.cl/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Inventario App is back up in 8c53382 after 12 hours, 13 minutes.


text:
Error with cheat items.

Hey,
When my players do /kit 2Years, they have an overcheat stuff, with P40, Sharpness 40, etc.
But they are always kicked : they can't connect to the server. After the restart same problem : disconnect again. My player tested the bug in 1.9 and 1.10. If I delete ViaVersion and ViaBackwards, he can connect without problems.
I'm using Java 8 and Paper Spigot 1.12.2.
Bug tested with the plugins : ViaBackwards and ViaVersion only.
The kit was generated by Essentials.
Thanks. :D

Please change debug to ‘true’ in server.properties, restart your server and do what triggers the disconnect. Please pastebin your console log after that. (:

authors: Matsv TheIntelloBox

repo: Matsv/ViaBackwards


text:
Merge pull request #10 from MatthewWilliamsCMH/Brad

Brad

Okay

authors: MatthewWilliamsCMH schneibley

repo: MatthewWilliamsCMH/pet-tracker


text:
deliverChangeRecords delivers changes which are under delivery

If deliverChangeRecords method was called from an observer, it should not try to deliver the changes which were sent to the observer.
Test case:
it("should not deliver changes already being under delivery", function (done) {
	var count = 0;
	var obj = { value: 1 };
	var callback = function () {
		count++;

		if (count > 1) {
			done(new Error("deliverChangeRecords should not deliver same changes more then once!"));
			return;
		}

		Object.deliverChangeRecords(callback);
	};

	Object.observe(obj, callback);
	obj.value++;

	setTimeout(function () {
		done();
	}, 10);
});

Note: this test case works fine under npm, but fails under FF and IE.
The fix is very simple.
Here https://github.com/MaxArt2501/object-observe/blob/master/dist/object-observe.js#L514
replace:
if (hdata.changeRecords.length) {
	handler(hdata.changeRecords);
	hdata.changeRecords = [];
}

with:
if (hdata.changeRecords.length) {
	handler(hdata.changeRecords.splice(0, hdata.changeRecords.length));
}

Another good catch, thank you.
About the fix: to avoid using a slow method like splice, let's just keep a reference to the array:
if (hdata.changeRecords.length) {
    var records = hdata.changeRecords;
    hdata.changeRecords = [];
    handler(records);
}

I'll implement this later.

Sure, I just didn't investigate whether it is safe to replace entire array.


text:
[W07H02] Add missing line break in printStatus() test

Added the missing line break to the printStatus test in TrackTest.java.
This solves #137.

Contents are identical
aber schmeißt immer noch eine fehler meldung
org.opentest4j.AssertionFailedError:

authors: LeoWoehler julian-hartl


text:
[W11H03] StalkerChat

Prints all messages into the console. For people who have trouble opening the UI software. You can only see general chat messages live.

Dreh die Pages um, dann kann das wegen mir rein :)


text:
🛑 Katniss (Glitch | App) is down

In 9b888d3, Katniss (Glitch | App) (https://katniss.glitch.me) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Katniss (Glitch | App) is back up in d5074a9 after 8 minutes.

repo: MaximizeLLC/Katniss-Status


text:
[Bug] Rendering Crash when placing immcraft chest

MC: 1.10.2
Forge: 2185
Mod: immcraft-1.1x-1.2.1
Place a chest and crashed to desktop.
Crash Log

Will fix

Fixed in 1.2.2 (in a moment)

authors: McJty MysticAura

repo: McJty/ImmersiveCraft


text:
[issue] cannot delete invalid destinations from dialer list

A receiver was deleted during a scheduled reset of the servers mining dimension. currently i am unable to delete invalid destinations from the dialer and as this has happened multiple times there are several identical but invalid destinations listed in the dialer. there needs to be a method of deleting missing destinations from the dialer list
perhaps this should be accomplished by analyzer providing a dialogue to remove the destination if it cannot find the reciever

RFTools dimensions should preferably be deleted with /rftdim safedel and after that removing the dimension folder. Otherwise RFTools can get confused. But you can use /rfttp cleanup to clean up all invalid matter receivers from the dialer list to fix this issue now.

the dimensions where this occurs are the nether and the deep dark these are not dimensions managed by RF tools. but again the ability to delete invalid destinations is something that needs to be added

It exists like I told you in previous comment: /rfttp cleanup

/rfttp is a admin command there needs to be a public command to perform this function per dialer

Well for un oped players the way to do is is to manually remove the receiver. There is no need for a command to do this.

unless the receiver has been destroyed ... XD

Well if the receiver is destroyed in game (by breaking or explosion) it should normally be removed from the list. If the receiver is destroyed out of game by removing a dimension (dimension reset or something) then it is up to the person who does that (presumably an admin) to run the needed cleanup commands.

why not solve the issue completely by running cleanup each time the server restarts ?

Well the cleanup command has to load all dimensions that have (or had) a receiver in them so that could add a bit to startup time. Also if a dimension was corrupt but only triggered a crash on visiting/loading it then it would now crash all the time.

so coming full circle it should be fairly simply to add a dialogue when checking with a destination anylizer to delete invalid destinations after the check button has been pressed

In theory yes but I still feel this is not the responsibility of the player. It is the admin that should worry about this

As a frequent Admin, I have a LOT of stupid players who can't be bothered
to tell me when they're doing things like crash the server, let alone
spamming bad dimensions.
This feature would be really nice.
Jeremiah Grimsley
"All of humanity is in peril of extinction if each one of us does not dare,
now and henceforth, always to tell only the truth, and all the truth, and
to do so promptly — right now." - R Buckminster Fuller
On Thu, Oct 22, 2015 at 12:42 PM, McJty notifications@github.com wrote:

In theory yes but I still feel this is not the responsibility of the
player. It is the admin that should worry about this
—
Reply to this email directly or view it on GitHub
https://github.com/McJty/RFTools/issues/362#issuecomment-150301881.

But its the player who ultimately has to deal with many bad destinations on their dialing device

Fixed in next release. Doing 'check' on an invalid destination will clean up all invalid destinations (not only the one that you were checking)

authors: Divineaspect McJty mikeloeven

repo: McJty/RFTools


text:
Method for checking if block is shown

This adds a new method isBlocking which tells whether a block is shown or not.

Merged -- Thanks!

authors: McNull pascalberger

repo: McNull/angular-block-ui


text:
improve the table context to parse html select with selected option

This will enable the tableContext to correctly parse the HTML select element with selected option item as a string.
Like the following <table>

It has a column containing <select><opiton></option>...</select>

Before this patch, the table is parsed as:

Name
Country

John
US China

Zhang
US China

With this patched, the table will be parsed as:

Name
Country

John
US

Zhang
China

Paging @atroppe to review the front-end work in this pull request!
Paging @goodevilgenius to review the back-end work in this pull request!
Paging @RedEnchilada to review the testing work in this pull request!

!reassign front-end @joshmedeski

Paging @joshmedeski to review the front-end work in this pull request!

!reassign testing @fortoulrodolfo

Paging @fortoulrodolfo to review the testing work in this pull request!

repo: Medology/FlexibleMink


text:
希望能够得到对parser的相关参数的解释和作用？

在阅读源码时，小白对内部参数有一些不了解，希望可以得到一些回答。比如相关参数的作用？

可以参考pytorch的分布式训练相关文档

好的，谢谢

repo: Megvii-BaseDetection/YOLOX


text:
训练自定义数据问题

你好，非常感谢你们的杰出工作。我按照文档训练自定义数据，按照VOC的格式转换了数据，训练完成后，有部分的非目标物体被误检，然后我加入了部分不含标注信息的样本，想要减少误检，训练流程正常通过，但是评估时报KeyError。
请问训练时是如何处理不带标注的样本的？或者是否有其他方法减少非目标物体的误检？谢谢

你好，请问训练时你遇到这样的问题了吗？能否把你训练的步骤简要说下

你好，请问训练时你遇到这样的问题了吗？能否把你训练的步骤简要说下

没有遇到，就按照教程里面的，把自己的数据转换VOC格式，然后替换相应的VOC2007/2012这些目录为自己的目录，然后调用train.py

@liuwei3612 尝试pull了最新分支吗？

你好，请问你遇到这样的问题吗？可以把你训练的简单说下

没有遇到，就按照教程里面的，把自己的数据转换为VOC格式，然后替换相应的VOC2007/2012这些为自己的目录，然后调用train.py

你好，请问你遇到这样的问题吗？可以把你训练的简单说下

请问解决了吗


text:
Consider running tap output into a target in CI

In #93 I decided to run the tap thru a simple target target-sqlite to see if the new streams I added worked.
By doing this, I instantly found mistyped fields in the Events stream.
Example error:
CRITICAL '20730626430' is not of type 'integer', 'null'
CRITICAL
CRITICAL Failed validating 'type' in schema['properties']['id']:
CRITICAL     {'type': ['integer', 'null']}
CRITICAL
CRITICAL On instance['id']:
CRITICAL     '20730626430'

I think this would be a great testing method to ensure our schemas are correctly typed.
Possibly a new step that runs:
poetry run tap-github --config c.json --catalog ca.json | poetry run target-sqlite -c sq.json and crashes if the exit code is non-zero.
Thoughts on implementing this?

Hi, @laurentS and @Ry-DS. I agree running a test to include landing in target-sqlite or even target-jsonl is probably helpful for catching JSON Schema typing issues.
There are SDK-based solutions as well, such as including an option for JSON Schema type validations against reach record when testing in pytest.

authors: Ry-DS aaronsteers

repo: MeltanoLabs/tap-github


text:
Help about that bots and can anyone give me tokens ?

im really sorry for asking this but i dont understand about create account need help and
can anyone give some discord tokens to me i need nuke a scammers discord server

https://github.com/Merubokkusu/discord-spam-bots/wiki/Account-Creator

repo: Merubokkusu/discord-spam-bots


text:
Make runners great again

Description
Looks like after merging the static tests, some structures are raising positive, review and fix each positive by running locally the static-test tool
we will follow the following list of fixes

[ ] whitespacecheck
[ ] Doccheck
[ ] Vera++

Useful links

PR: test #25
PRs: Runner fail: between  #26 and #32, both included

errors checkshell:
ine 23: /home/deskto/Documents/m4a-firmware/dist/tools/shellcheck/dist/tools/ci/changed_files.sh: No such file or directory
line 24: /home/desktop/Documents/m4a-firmware/dist/tools/shellcheck/dist/tools/ci/github_annotate.sh: No such file or directory
errors Vera++:
error: couldn't open "boards/m4a-mb/board.c": no such file or directory
while executing
"open $fileName "r""
("foreach" body line 6)
invoked from within
"foreach fileName [getSourceFileNames] {
if { $fileName == "-" } {
# can't check the content from stdin
continue
}
set file [op..."
(file "/home/bucare/Documents/M4ALL/m4a-firmware/dist/tools/vera++/scripts/rules/F001.tcl" line 4)
the coccinelle test:
--- tests/periph_uart/main.c
+++ /tmp/cocci-output-70713-ce9986-main.c
@@ -41,7 +41,7 @@
#define MAX_SENTENCE_SIZE 128
#define MAIN_QUEUE_SIZE (8)
-static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
+msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
size_t count = 0;
char uart_buff[MAX_SENTENCE_SIZE] = {0};
Python path configuration:
PYTHONHOME = '/lib/x86_64-linux-gnu/..'
PYTHONPATH = '/usr/bin/../lib/coccinelle/python'
program name = 'python3'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/usr/bin/python3'
sys.base_prefix = '/lib/x86_64-linux-gnu/..'
sys.base_exec_prefix = '/lib/x86_64-linux-gnu/..'
sys.executable = '/usr/bin/python3'
sys.prefix = '/lib/x86_64-linux-gnu/..'
sys.exec_prefix = '/lib/x86_64-linux-gnu/..'
sys.path = [
'/usr/bin/../lib/coccinelle/python',
'/lib/x86_64-linux-gnu/../lib/python38.zip',
'/lib/x86_64-linux-gnu/../lib/python3.8',
'/lib/x86_64-linux-gnu/../lib/python3.8/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fe4828a6180 (most recent call first):

licenses Errors:
ls: cannot access './patterns': No such file or directory
file has an unknown license header: 'boards/m4a-mb/board.c'
file has an unknown license header: 'boards/m4a-mb/include/board.h'
file has an unknown license header: 'boards/m4a-mb/include/gpio_params.h'
file has an unknown license header: 'boards/m4a-mb/include/periph_conf.h'
file has an unknown license header: 'firmware/include/main.h'
file has an unknown license header: 'firmware/main.c'
file has an unknown license header: 'tests/board_stm32f469i-disco/main.c'
file has an unknown license header: 'tests/driver_ds18/main.c'
file has an unknown license header: 'tests/driver_epd-bw-spi/epd_bw_spi_params.h'
file has an unknown license header: 'tests/driver_epd-bw-spi/external_drivers/epd_bw_spi/epd_bw_spi.c'
file has an unknown license header: 'tests/driver_epd-bw-spi/external_drivers/epd_bw_spi/include/epd_bw_spi.h'
file has an unknown license header: 'tests/driver_epd-bw-spi/external_drivers/epd_bw_spi/include/epd_bw_spi_internal.h'
file has an unknown license header: 'tests/driver_epd-bw-spi/external_drivers/epd_bw_spi/include/epd_bw_spi_params.h'
file has an unknown license header: 'tests/driver_epd-bw-spi/external_drivers/epd_bw_spi/include/epd_bw_spi_pictures.h'
file has an unknown license header: 'tests/driver_epd-bw-spi/main.c'
file has an unknown license header: 'tests/driver_u8g2/main.c'
file has an unknown license header: 'tests/periph_uart/main.c'
file has an unknown license header: 'tests/unittests/main.c'
file has an unknown license header: 'tests/unittests/map.h'

it seems you need to resolve some dependencies @eduazocar


text:
Recursive TemplateMonad programs are slow to run

The runtime of the following function increases drastically with n (comments give the runtimes on my machine):
From MetaCoq Require Import Template.All.
Import MonadNotation.

Fixpoint tm_double n : TemplateMonad nat :=
  match n with
  | 0 => ret 0
  | S n =>
    n' <- tm_double n ;;
    ret (S (S n'))
  end.

Time Run TemplateProgram (tmPrint =<< tm_double 1000). (*  1.296s *)
Time Run TemplateProgram (tmPrint =<< tm_double 2000). (*  4.444s *)
Time Run TemplateProgram (tmPrint =<< tm_double 3000). (* 10.117s *)
Time Run TemplateProgram (tmPrint =<< tm_double 4000). (* 21.374s *)
Time Run TemplateProgram (tmPrint =<< tm_double 5000). (* 29.005s *)

This prevents me from writing nontrivial recursive functions in the template monad.

I think that this is an implementation issue in the interpreter. Mtac2 uses a strategy where they work directly on the reduction mechanism whereas the one here is (I'm pretty sure) just calls to hnf followed by pattern matches.
It is possible that we could improve this by fusing tmBind with each operation and then implementing tmBind as a function. This would avoid places where we have tmBind (tmBind .. ..) .. and keep computation within the Coq kernel in that case. In your example, you will essentially build a tmBind (tmBind (tmBind .. ..) ..) ..) ..) tower before actually making any progress which is sub-optimal at best. Out of curiosity, what impact does cps converting this have?
Fixpoint tm_double n (acc : nat) : TemplateMonad nat :=
  match n with
  | 0 => ret acc
  | S n =>
    tm_double n (S (S acc))
  end.

I assume that evaluating the above will be significantly faster since there is no tmBinds at all. This is an upper bound on the performance improvement that you could expect from the proposal above but there would be some extra overhead to normalize things. Personally, it seems like both fixing the interpreter and making tmBind a function should be done, but they are different amounts of work.

Out of curiosity, what inpact does cps converting this have?

The CPS converted version is indeed significantly faster---the same benchmarks finish near-instantly.

repo: MetaCoq/metacoq


text:
Authorization Token已过期，请重新生成/获取

在个人实名后，生成API key，SDK调用报如下错误：
APIAuthenticationError('Error code: 401, with error text {"error":{"code":"1003","message":"Authorization Token已过期，请重新生成/获取。"}}')
重新生成API key，依然报401错误。

你好，我遇到了相同的问题，请问你是如何解决的呢


text:
add guideline: Node.js version usage & support

What version(s) of Node.js should be run in a development, CI, or production environment?  Evaluate risk of running EOL Node.js versions in these environments.
For OSS projects, should the minimum supported Node.js version track the above?  When can OSS projects drop an old version of Node.js, when should they, and when must they?
Any special considerations for odd-numbered releases?  These versions do not enter LTS and have a lifespan of about nine months.
Given Node.js has a documented release cadence--a version going EOL should not be a surprise--how should projects use this info to stay within the guidelines over time?

We've also had questions around:

what the engines.node field in package.json represents and how that relates to the current, past, and future versions of Node (considering that Yarn v2+ ignores it by default when installing dependencies)
what .nvmrc represents and what its relationship to engines.node is
how the versions of Node we test (i.e. the matrix we use in CI) relate to both of these

Perhaps we ought to use this space to clarify these as well?

authors: boneskull mcmire

repo: MetaMask/contributor-docs


text:
json-rpc-engine: Support cancelation

Would be nice if handle returns some object which represents running request with a method abort which aborts the request, like XMLHttpRequest.abort()

Looks like a WONTFIX issue?

https://github.com/MetaMask/metamask-extension/issues/4225#issuecomment-754882813

Closing as WONTFIX.

Yes, for context, in order to be able to cancel a request now with EIP-1193, request would have to take a signal from AbortController. A change would have to be submitted via a new EIP.

authors: MajorLift mcmire safareli

repo: MetaMask/core


text:
Artist details page removed

Artist details page and everything around it removed

 Remove artist detail page and all corresponding stuff

 404 on /my-artists

repo: MetalDetectorRocks/metal-detector-main


text:
Could not find ros_system_fingerprint module

Tried to run 'ros2 run system_fingerprint imprint' and it crashes with the following trace:
Traceback (most recent call last):
File "/opt/ros/rolling/lib/system_fingerprint/scripts/imprint", line 33, in
sys.exit(load_entry_point('UNKNOWN==0.5.0', 'console_scripts', 'imprint')())
File "/opt/ros/rolling/lib/system_fingerprint/scripts/imprint", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/ros/rolling/lib/python3.10/site-packages/system_fingerprint/imprint.py", line 5, in
from ros_system_fingerprint import modules
ModuleNotFoundError: No module named 'ros_system_fingerprint'
[ros2run]: Process exited with failure 1

Apologies! This is indeed a problem in the binary version. It was fixed in https://github.com/MetroRobots/ros_system_fingerprint/pull/7 and the new version will be available with the next rolling sync.


text:
Clock faces not showing after Upgrading to MM 2.12

My analog clock faces are not visible anymore after upgrading to MagicMirror 2.12, not sure if anyone else experienced this or not?
Can you please check if it works for others?
i have face-004 configured in config file but i dont see it on MagicMirror.

Duplicate of: https://github.com/MichMich/MagicMirror/issues/2072

authors: MichMich hriday-khurana

repo: MichMich/MagicMirror


text:
wasm-demo not working?

Should this be working now? I'm just getting a black square.

Well technically the library is able to start render things to a canvas (see the example).
At the moment, the wasm-demo is meant to draw a dot wherever you click, but for whatever reason it'll add the item to the World but I think the conversion between screen units and drawing units are off and it's actually drawing the dot outside the visible area...

At the moment, the wasm-demo is meant to draw a dot wherever you click,

This works for me now, and the example program is also working. Ok to close by me. :+1:

It looks like the demo published to GitHub Pages uses the wrong import paths. I'll see if I can fix it up after work, then it should be okay to close this issue.

In firefox on a mac I am getting an error in the console that the mime type is wrong.
Loading module from “https://michael-f-bryan.github.io/arcs/demo/pkg/arcs_demo.js” was blocked because of a disallowed MIME type (“text/html”). index.html
Loading failed for the module with source “https://michael-f-bryan.github.io/arcs/demo/pkg/arcs_demo.js”. index.html:22:1

https://michael-f-bryan.github.io/arcs/demo/index.html is returning a 404, and so the page renders blank.
By the way, very cool article about ramer douglas peucker.

repo: Michael-F-Bryan/arcs


text:
Testing on hardware and in real applications

I'm at a point where this crate will need a bit of testing in the real world to work out what the most ergonomic way of doing things is.
I'm looking for people who are experimenting with embedded devices and need to work with gcode. If you are developing a desktop application that deals with gcodes, I'm keen for your feedback too!
If you try out this crate and have any feedback, or if you are just experimenting and want to know how best to use it, let me know by making a comment here and I'll try to do everything I can to help out :)

You don't have an example of the high level parser yet, looking at the test code it looks like you are passing  the results of the low level parser through println! to the high level parser:
let lines = low_level_parser
.inspect(|c| println!("{:?}", c))
.collect::<Result<Vec<_>, >>()
.unwrap();
let strongly_typed: Vec<> = lines.into_iter().map(type_check).collect();
since println! is part of std this won't work for embedded. Is there a different way to use the high level parser?

The inspect() method does is lets you inspect the contents of an iterator without consuming or changing it, and I was using that to see what each element in the iterator was.
You should be able to delete it without affecting anything.

Great, got a quick version working this way:
let lexer = Tokenizer::new(GCODE.chars());
let tokens = lexer.filter_map(|t| t.ok());
let parser = BasicParser::new(tokens);
for line in parser {
if let Line::Cmd(x) = line.unwrap() {
if x.command() == (CommandType::G, 0) {
let args = x.args();
for arg in args.iter(){
match arg.kind {
ArgumentKind::X => new_x = arg.value,
ArgumentKind::Y => new_y = arg.value,
_ => {},
}
}
}
here's the full code (will make a repo once it's cleaned up a little more). https://pastebin.com/fZTJsquH

@etrombly wow, that looks awesome! Keep me updated on how you're going and if there's anything I can do to make the gcode library easier to use. It looks like it was really cumbersome to try and get the whole lexer/parser thing set up :(

It was actually pretty easy to use once I figured it out. Just had to dig around your tests to find examples. I think having an example like what I wrote would help people getting started with it. If I were making it more generic I would match on the command type and command number though.

I just rewrote the parser and deprecated the old low_level one. The usage should be pretty much the same, I've just rearranged how you access things.
extern crate gcode;

use gcode::{Parser, Tokenizer, Line};
use gcode::parser::Number;

fn main() {
    let src = include_str!("../tests/data/PI_octcat.gcode");

    let lexer = Tokenizer::new(src.chars());
    let tokens = lexer.filter_map(|t| t.ok());

    let parser = Parser::new(tokens);

    for line in parser {
        handle_line(line.unwrap());
    }
}

fn handle_line(line: Line) {
    match line {
        Line::ProgramNumber(n) => {}
        Line::Cmd(cmd) => {
            match (cmd.kind, cmd.number) {
                (CommandKind::G, Number::Integer(90)) => { ... }
                _ => {}
            }
        }
    }
}

It's a little annoying because of the rightward drift and because you need to explicitly deal with the fact that the number for a G or M code may be a decimal. So The number is actually an enum which can either be an Integer(u32), or a Decimal(u32, u32) (the numbers before and after the decimal point).

Just started working on this again since japaric updated RTFM. One way to handle rightward drift is:
const G0: (CommandKind, Number) = (CommandKind::G, Number::Integer(0));
match (cmd.kind, cmd.number) => {
    G0 => { ... }
    - => {}
}

A bit of a hassle defining all the constants though. Not sure how much additional size it would add to the library either.

Hello, I am trying to write a small command line tool for preprocessing Gcode using this library. I first went with a first try in order to try to apply a translation to every X position using the following prototype:
fn main() {
    let src = "O1000
    T1 M6
    G90
    G01 X-75 Y-75 S500 M3
    G43 Z100 H1
    G01 Z5
    N20 G01 Z-20 F100";

    let translate_x = 42.0;

    let mut lines = gcode::parse(src);
    let mut new_lines = vec!();
    for line in lines {
        if let Some(x) = line.value_for('X') {
            let mut new_line = Gcode::new(line.mnemonic(), line.number(), line.span());
            for word in line.args() {
                if word.letter == 'X' {
                    let new_arg = Word::new(word.letter, word.value + translate_x, word.span);
                    new_line.add_argument(new_arg);
                } else {
                    new_line.add_argument(word.clone());
                }
            }
            new_lines.push(new_line);
        } else {
            new_lines.push(line);
        }

    }

    for line in new_lines {
        println!("{}", line);
    }
}

This works well and translates the X value just fine, but I found it cumbersome to create a new Gcode and Word from existing ones. Maybe I am doing something wrong here, any idea on how to make this look better?

I'd never thought of updating a gcode in place, would it be easier if we had an args_mut() method which yields items of &mut Word?
What are your thoughts on this?
use gcode::{self, Gcode, Word};

fn translate_x(mut code: Gcode, dx: f32) -> Gcode {
  for arg in code.args_mut() {
    if arg.letter == 'X' {
      arg.value += dx;
    }
  }

  code
}

fn main() {
  let src = "O1000
    T1 M6
    G90
    G01 X-75 Y-75 S500 M3
    G43 Z100 H1
    G01 Z5
    N20 G01 Z-20 F100";

  let dx = 42.0;

  let translated = gcode::parse(src).map(|g| translate_x(g, dx));

  for code in translated {
    println!("{}", code);
  }
}

authors: Michael-F-Bryan MicroJoe etrombly

repo: Michael-F-Bryan/gcode-rs


text:
element in included base type not appearing on the html form

I have an issue where an element defined in a base type doesn't appear on the generated form.
This happens when the schema file defining the root element includes a second schema file defining the type of the root element, which in turn includes a third schema file defining the base type.
I have three files. First is test.xsd, specifying the root element "test":
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

   <xs:include schemaLocation="MyType.xsd"/>

   <xs:element name="test" type="MyType"/>

</xs:schema>

Second is MyType.xsd defining "MyType" which extends the type "Base":
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

   <xs:include schemaLocation="Base.xsd"/>

   <xs:complexType name="MyType">
   	<xs:complexContent>
   		<xs:extension base="Base">
   		</xs:extension>
   	</xs:complexContent>
   </xs:complexType>

</xs:schema>

Third is Base.xsd, which defines the type "Base", specifying an element called "baseElement":
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

   <xs:complexType name="Base">
   	<xs:sequence>
   		<xs:element name="baseElement" type="xs:string"/>
   	</xs:sequence>
   </xs:complexType>

</xs:schema>

No field for the "baseElement" element appears on the generated html form.
Note that this happens with xsd2html2xml 3.2, it is not caused by the fix you made to avoid multiple fields in the base type.
cheers,
Kevin.

The issue should be fixed in release 3.3. Can you confirm?

Hi,
Sorry - I missed github's notification of your comment 10 days ago, I would have replied.
Yes, the issue appears to be fixed. Thanks so much!
Kevin.

Glad it works! I'm closing this issue.

authors: MichielCM kgi-github


text:
Unable to create ToDo skill from VA

Project
Virtual Assistant, Skills (ToDo)
Description
I am getting a "Constructor on type 'ToDoSkill.ToDoSkill' not found." exception when trying to create a ToDo item from the main VA bot.
From looking the source, it seems that @feich-ms  added MailService to the ToDoSkill constructor and the activator from SkillDialog is failing.
    public ToDoSkill(ISkillConfiguration services, ConversationState conversationState, UserState userState, IBotTelemetryClient telemetryClient, ITaskService serviceManager = null, IMailService mailService = null, bool skillMode = false)

To Reproduce

Pull the latest from master.
Start the emulator and say "add milk to my to do list"
You'll get a "Sorry, something went wrong." message.

Expected behavior
I would like to be able to add To Dos from the Virtual Assistant.
Screenshots
Exception in SkillDialog

Error en emulator

Closed by #492

authors: gabog lauren-mills

repo: Microsoft/AI


text:
[Event Request] Table 83 Item No. - OnValidate: OnValidateItemNoFromProdOrderLine

In table 83 Item Journal Line, trigger Item No. - OnValidate, please add the following publisher OnValidateItemNoFromProdOrderLine:
[…]
      IF ProdOrderLine.COUNT = 1 THEN BEGIN
        VALIDATE("Order Line No.",ProdOrderLine."Line No.");
        "Unit of Measure Code" := ProdOrderLine."Unit of Measure Code";
        "Location Code" := ProdOrderLine."Location Code";
        VALIDATE("Variant Code",ProdOrderLine."Variant Code");
        VALIDATE("Bin Code",ProdOrderLine."Bin Code");

        // >> New
        OnValidateItemNoFromProdOrderLine(VAR Rec,ProdOrderLine);
        // << New

      END ELSE
        "Unit of Measure Code" := Item."Base Unit of Measure";
    END;
  "Entry Type"::Consumption:
[…]

We already have this in latest version, it solve you request:
LOCAL CopyFromProdOrderLine(ProdOrderLine : Record "Prod. Order Line")
VALIDATE("Order Line No.",ProdOrderLine."Line No.");
"Unit of Measure Code" := ProdOrderLine."Unit of Measure Code";
"Location Code" := ProdOrderLine."Location Code";
VALIDATE("Variant Code",ProdOrderLine."Variant Code");
VALIDATE("Bin Code",ProdOrderLine."Bin Code");
OnAfterCopyFromProdOrderLine(Rec,ProdOrderLine);

authors: AlexanderYakunin NKarolak

repo: Microsoft/ALAppExtensions


text:
ICM Webhook

Hi,
We are MS team and we would like to know if azure appinsights supports ICM web hook for alerts out of the box?

For non-public facing questions I'd suggest to use links from here to ask the question. DL that listed there will be the best bet for this question. Yes, there is a solution for ICM that a few teams are using today and I can share the link on DL.

authors: SergeyKanzhelev shkrishms

repo: Microsoft/ApplicationInsights-JS


text:
How to copy files over to use in Bash

I am moving C files from my school's server to my computer and I put the file in \mnt\c. How do I get to root and open in Bash so that I can see and modify these files?

Hi @tapotter2 -- \mnt\c is not a valid Linux path.  Did you mean either /mnt/c or C:\?
If you want to get to that directory in Linux, simply type cd /mnt/c.  If you want to get to that directory in Windows, open up File Explorer and type C:\ into the path bar at the top of the window.  You will not need Linux root permissions to edit the files.
If you need Windows Administrator permissions to edit the files, then you will need to launch bash as a Windows Administrator to do that.  But it would be better if you put the files somewhere, such as your Windows home directory, that doesn't require Windows Administrator permissions to modify.
If that's not what you are trying to do, could you clarify what you are trying to do?

Okay Yes that is what I meant, I am sorry. But thank you I found where I need to go but now it is saying that permission is denied does that mean that I need to run as Admin?

@tapotter2 You probably don't have permission to edit files on C: (which is the usual).
In that case, you need to close all bash instances and open it as administrator, or else anything inside the linux subsystem will fail with permission denied when trying to modify the file.
It's usually recommended though that you move those files to some folder under C:\Users\YourUser. Inside that folder, your user has write permissions even without elevating to Administrator, which means that bash and anything you open from there will be able to modify the files without you having to open bash as Administrator.

Got it thanks

authors: aseering mateusmedeiros tapotter2

repo: Microsoft/BashOnWindows


text:
[Node] Slack or Bot Connector not working for individual users

Midway through conversations with the bot in slack the bot has stopped responding to the user. There is no traffic to our node server from these conversations.
Additional user's conversations have also stopped working with no pattern between them.
Other users on slack and other clients can still access and chat with the bot.
Is there a limit on messages in slack or bot connector?
LUIS is also being used but pretty confident were not hitting their limit either as other users can get responses.
Thanks.
UPDATE:
The bot has started working again now. Would be great if you could shed some light on why this would happen.

Hi AidanBr, what's the bot handle? https://dev.botframework.com/bots?id=

Hey,
The bot handle is SelfServiceBot
Thanks.

@AidanBr sorry, did not have time to investigate yet. I'm going to close this issue since it's not affecting you anymore, but I've opened a ticket to do some investigation. Will post here some more info if we get to it. Thanks!

authors: AidanBr Andrea-Orimoto

repo: Microsoft/BotBuilder


text:
New bot creation is not working

In https://dev.botframework.com bot creation was working fine. But today when I create a new bot, it stopped working.  The chat window to test the bot is disappeared. But the bots created before working fine.  When i try to test the new bot with "Add to skype" test link. Its failing with this error "Oops, there was a problem with your link The bot was not found. "  Any reason why its failing?

I am seeing the same issue .  I've created another issue but I'll close it as a duplicate.
When I click edit on either MS Teams/Skype channels I see.

Older bots seem OK when I configure the same channels so it looks like there is a problem with new Bot registration.

Further to my previous comment, it seems it's only Skype/Teams having this issue.  Other channels I've tested with a new Bot and they work fine.

Thanks for the report - we have identified an intermittent issue and a fix is being deployed today. Please retry later today.

its working fine now. thanks for the quick fix.

i also solved this issue by filling in 'Long Description' in 'Publish' tab in 'Skype' channel details and saving the form.

@desflan @dicastro hey guys, did you submit the form too or just save?

As of yesterday, I am also encountering this error (see screenshot)
Creating a new Bot Registration Channel does not help. Even more strangely: Links that I used previously to add bots to Skype give the same error now.

Hey @Rufus1123
This issue is tracking the Skype join link problem: https://github.com/Microsoft/BotBuilder/issues/4700

authors: EricDahlvang ManoloPatrimonio Rufus1123 danmarshall desflan dotnetdude jamesemann


text:
Bot Builder handling of multiple messages from the same user

Let's say a user sends out 10 messages right after the other. They sit at keyboard and type 1 ENTER 2 ENTER 3 ENTER. etc.
All messages arrive quickly after another and the API doesn't process the messages before they accumulate. My MessagesController calls Conversation.SendAsync(...). Does the Bot Framework process the user's messages in parallel or serially?

Hi, have you been able to answer this question on your own or do you still need an answer?

authors: JasonSowers srozga


text:
Session.replaceDialog to an existing Intent

Not sure if this is a duplicate issue (didn't find one), I have this issue.
I'm using the good api session.replaceDialog to override session info ( like session.message ) and replace the current session with this data like:
session.replaceDialog('/');

This works perfectly, when I'm putting in  session.message the new utterance that will be then matched to an existing Intent, and the dialog on callback will be then fired for this intent.
In some circumstances, I need to replace a session to a specific intent, supposed to have a Intent with a four steps waterfall model like this (Simplified version of my code)
/**
       * Help Intent
       * two-turn intent dialog / two steps waterfall
       * @example help me
      */
      self.dialog.on(Intent.Type.HelpIntent,
      [
          function (session, args, next)
          {
           //WF1: here we show help and ask if user wants more
           session.send( self.getLocalizedString('HELP_HINT1','HELP_HINT1') );
            BotBuilder.Prompts.confirm(session, self.getLocalizedString('HELP_MORE','HELP_MORE') );
         },
         function (session, args, next)
          {
           // WF2: if user is fine, present some KB options
          var response=results.response;
            if ( response ) {
              BotBuilder.Prompts.choice(session,
                self.getLocalizedString('HELP_CHOOSER','HELP_CHOOSER'),
                self.getLocalizedString('HELP_KB_OPTIONS','HELP_KB_OPTIONS') );
            }
          },
          function (session, args, next)
          {
              //WF3: the user choose some option (good or bad)
              // Botframework will forward here multiple times with "I didn't understand. How can I help you?"
              var response=results.response;
            if (response) {
               // this is a good option, we send KB entry and end it up.
              var kbEntry = response.entity;
              var kbIndex = response.index; // this index starts from 1!
              var kbMatchingRatio = response.score;
              var kbValues = self.getLocalizedString('HELP_KB_VALUES',[]);
               //...some code
              session.send( msg );
          }
          else { // not found
               // if user type something the BotFramework will discard definitively
              // now I want to go back to WF3 and ask again help
              // so I prompt a confirm for more help:
              session.send( self.getLocalizedString('HELP_UNKNOWN','HELP_UNKNOWN') )
              BotBuilder.Prompts.confirm(session, self.getLocalizedString('HELP_MORE','HELP_MORE') );
          }
          },
          function (session, args, next)
          {
             //WF4: at confirm I would forward to KB options
            // in order to loop until user choose not help any more
             var response=results.response;
            if ( response ) {
              session.replaceDialog('/'+Intent.Type.HelpIntent);
            }
           }]

This code will ends up with a
Session Error: Dialog[/HelpIntent] not found.
Session Error: Dialog[/HelpIntent] not found.
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Dialog[/HelpIntent] not found.

My intent is HelpIntent, and I have tried to replace the dialog with
session.replaceDialog('/'+Intent.Type.HelpIntent);

Here is a snippet of this conversation:
help me
You can ask me any lyrics to any song. <--this is WF1
Do you need more help?
yes
How can I help you? <--this is WF2
   1. Get a song by lyrics words
   2. Get a song by name and artist
   3. Get a quote by an artist
gote a quote
I didn't understand. How can I help you? <--this is botframework answering
   1. Get a song by lyrics words
   2. Get a song by name and artist
   3. Get a quote by an artist
quote
I'm sorry, I'm afraid there is help available for this. <--this is WF3
Do you need more help?
yes
Session Error: Dialog[HelpIntent] not found. <--this is WF4
Session Error: Dialog[HelpIntent] not found.
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: Dialog[HelpIntent] not found.

Same error if using session.replaceDialog('HelpIntent')

This is where you want to move your Help waterfall out to its own dialog called '/help' or something. That way you can keep them in the help dialog until you've answered all of their questions. So from your on handler you'd call beginDialog() which you can do using this shorthand syntax .on(Intent.Type.HelpIntent, '/help'). Then in the last step of your /help dialogs waterfall you'll call session.replaceDialog('/help') if they say yes to more help or session.endDialog() if they say no. Make sense?

Please re-open if you're still having issues

authors: Stevenic loretoparisi


text:
[Slack] ConversationUpdate regression - change in workflow from Slack side

Somewhere roughly between May 30th and June 1rst a regression got introduced in botservice for the Slack channel affecting conversationUpdate.  We are using Node.js as our interface into botservice.  Can reproduce on botbuilder@3.8.4.  My guess is that it's likely a change on the Slack side could have regressed the behavior but am not positive.
One common scenario is that we have a bot that stays in a slack channel for long periods of time (e.g. #general channel).  We then trigger off conversationUpdate to capture when new users join the channel.
May 30th behavior (expected) - when a new user (non-bot) joins the channel, that new user is shown in the list of message.membersAdded .
June 1rst behavior - the above is no longer the case.  When a new user (non-bot) joins the channel, that new user is no longer shown in the list message.membersAdded.

Reading the this post from Slack, it looks like they changed their events emitted on users entering channels so the Bot Connector might need to be updated.
It seems that depending on the team/channel size Slack will determine which activities to emit, message.channel_join (old activity) or member_joined_channel (new activity).
Thanks for reporting this, we'll look into it.

This is a bug in our Slack channel.  We'll get a fix out asap

The fix has been deployed.  Please reopen if you are still experiencing the issue.

Thank you @craigjensen

Fast work, appears fixed.  You guys rock - thank you.

authors: craigjensen nwhitmont phillipeloher stevengum97


text:
Cannot display the entire text in the hero card

var card = new builder.HeroCard(session);
card.title("Did you mean one of the options below :");
card.buttons([
builder.CardAction.imBack(session, DIDYOUMEANARRAY[0],DIDYOUMEANARRAY[0]),
builder.CardAction.imBack(session, DIDYOUMEANARRAY[DIDYOUMEANARRAY.length-1],DIDYOUMEANARRAY[DIDYOUMEANARRAY.length-1])
]);
Actual Results

It may be easier if you make a function to create your hero card and pass the array of values you have, DIDYOUMEANARRAY[] into the function like so:
function createHeroCard(session, choices) {
return new builder.HeroCard(session)
.title('Please say or click your choice')
.buttons(choices.map(choice => new builder.CardAction.imBack(session, choice, choice)));
}
Also check to make sure you have more than 1 value in your array, if you could post the array that would help too.

Can you please fill out the template so we can better assist you.  What channel are you using?

Any luck ??

There is a limitation on the length of text in buttons in different channels I assume you have hit that limit.  Please reopen if you are willing to provide more details.


text:
Support Slack's app_mention Event

Bot Info

SDK Platform: Node.js
SDK Version: 3.14.0
Active Channels: Slack
Deployment Environment: Azure Bot Service

Issue Description
Add support for the app_mention event in Slack. Right now subscribing to app_mention doesn't do anything. This means that the bot has to be specifically coded for Slack. It would be nice if there was an option to just have the bot respond whenever it was mentioned in a channel instead of all the time.
Expected Behavior
Adding in the app_mention event in Slack would trigger a response from Bot Service whenever a bot is mentioned.
Actual Results
Bot Service doesn't receive the app_mention event so there is no response from the bot when mentioning if channel.messages is turned off. If it is turned on, the bot answers to all messages, not just ones where it is mentioned.

Turning on the app_mention event while channel.messages is on adds an item to the array "entities" that includes a field type within the message object when sent via slack. Unfortunately there is no current way to automatically filter only these messages without additional slack specific code.  However, when this event is on, it is possible to create middleware (v4 version) that checks if slack messages include this field with a mention.
Here's an example middleware implementation using v3 (requires using a message to avoid resetting the current dialog, however session.reset() can be used if all dialogs are 1-step)
var util = require('util');

module.exports = {
    isMentioned: function(session, next) {
        if (session.address.channelId === 'slack' &&
            !(
                session.entities[0] && session.entities[0].type === 'mention' &&
                session.entities[0].text === util.format("@%s",session.address.bot.name)
            )){
            console.log("not mentioned");
            session.send(); //send empty message if a slack message didn't include a mention
	 }
	else{
            console.log('mentioned');
            next();
        }
    }
}

We will look into including this natively later on. I will update if this is possible in v3 without sending a message. That said, it is already possible to do this in v4 without sending a message. (similar to the implementation above, but with "return" instead of sesssion.send())

Turning on the app_mention event while channel.messages is on adds an item to the array "entities" that includes a field type within the message object when sent via slack. Unfortunately there is no current way to automatically filter only these messages without additional slack specific code.  However, when this event is on, it is possible to create middleware (v4 version) that checks if slack messages include this field with a mention.
Here's an example middleware implementation using v3:
var util = require('util');

module.exports = {
    isMentioned: function(session, next) {
        try{
            if (session.address.channelId === 'slack' &&
                !(
                    session.entities[0] &&
                    session.entities[0].type === 'mention' &&
                    session.entities[0].text === util.format("@%s",session.address.bot.name)
                )){
                console.log("not mentioned");
            }
            else{
                console.log('mentioned');
                next();
            }
         }
         catch(err){
             console.error(err);
         }
    }
}

We will look into including this natively later on.

Thanks! I'll look into the middleware solution.

Thank you for opening an issue against the Bot Framework SDK v3. As part of the Bot Framework v4 release, we’ve moved all v3 work to a new repo located at https://github.com/microsoft/botbuilder-v3. We will continue to support and offer maintenance updates to v3 via this new repo.
From now on, https://github.com/microsoft/botbuilder repo will be used as hub, with pointers to all the different SDK languages, tools and samples repos.
As part of this restructuring, we are closing all tickets in this repo.
For defects or feature requests, please create a new issue in the new Bot Framework v3 repo found here:
https://github.com/microsoft/botbuilder-v3/issues
For Azure Bot Service Channel specific defects or feature requests (e.g. Facebook, Twilio, Teams, Slack, etc.), please create a new issue in the new Bot Framework Channel repo found here:
https://github.com/microsoft/botframework-services/issues
For product behavior, how-to, or general understanding questions, please use Stackoverflow.
https://stackoverflow.com/search?q=bot+framework
Thank you.
The Bot Framework Team

authors: JasonSowers burkeholland nyxsys