text:
Ayncio Socket instantiation creates event loop

When creating a socket object using asyncio a new event loop is started. i'm not an async expert but this was a bit surprising and led to some difficulty trying to embed async functionality into a class that initializes the socket in it's own init function.
here's a simple example (intentionally leaving out cleanup / error handling)...
the client side:
import zmq

if __name__ == "__main__":
    ctx = zmq.Context.instance()

    client = ctx.socket(zmq.REQ)
    client.connect("tcp://127.0.0.1:5555")
    client.send(b"ping")
    print(client.recv())

the server side
import asyncio
import zmq.asyncio

class Player:
    def __init__(self):
        self.ctx = zmq.asyncio.Context.instance()
        # this doesn't work!
        self.server = self.ctx.socket(zmq.REP)

    async def bounce(self):
        self.server.bind("tcp://*:5555")
        msg = await self.server.recv()
        print(msg)
        await self.server.send(b"pong")

if __name__ == "__main__":
    asyncio.run(Player().bounce())

this hangs I believe because aysncio.run doesn't seem to create an event loop before Player is instantiated or the async socket can't properly retrieve it.
I can either switch the main to do this:
    loop = asyncio.get_event_loop()
    loop.run_until_complete(Player().bounce())
    loop.close()

or I can create a separate async function to initialize the socket
class Player:
    def __init__(self):
        self.ctx = zmq.asyncio.Context.instance()
        self.server = None

    async def connect(self):
        if self.server is None:
            self.server = self.ctx.socket(zmq.REP)

    async def bounce(self):
        await self.connect()
        self.server.bind("tcp://*:5555")
        msg = await self.server.recv()
        print(msg)
        await self.server.send(b"pong")

Both approaches are easy to do, but it seems unintuitive that creating a socket would lead to this behavior. As I said I'm new to async, so perhaps this is expected. If not I'm wondering whether there is a better way to delay how the event loop is pulled in when you create a async socket object or a more standard way to initialize these objects in an object oriented setting.

I see there are similar issues already: #1255 #1296, maybe that's a good indication that either a change can be made to make avoid this scenario or documentation can be added to make it clear that this setup isn't valid?

Yeah, I think attaching later is probably the right thing to do. Then the question becomes: do we attach to a specific loop as soon as we need to (e.g. first send/recv), or do we put a call to asyncio.get_event_loop() in every method that needs it. The former has the same issue we have now, but delayed one loop later (e.g. two consecutive calls to asyncio.run(socket.send()) still won't work), while calling get_event_loop() all the time seems wasteful and has the opposite problem: hooking up one socket to multiple loops without warning could have its own set of issues. But at least using it with asyncio.run should usually work.

is calling asyncioio.run consecutively typical?
also, wondering if it's possible to push the responsibility for creating the event loop outside of the socket and use get_running_loop() instead of get_event_loop().

is calling asyncio.run consecutively typical?

No, I don't think so. But that doesn't mean it doesn't happen. When implementing a sync api on top of an async one, it can happen. It's exactly the kind of thing people are doing now that doesn't work (calling methods that invoke the current loop, then using asyncio.run() to create a new one, which I think people often don't expect it to do).

also, wondering if it's possible to push the responsibility for creating the event loop outside of the socket and use get_running_loop()

That's a good idea, although our methods are not actually coroutines, they are future-returning functions, so e.g. asyncio.run(socket.send()) wouldn't work if socket.send relied on get_running_event_loop. I'll think about whether there's a way to safely rely on get_running_loop(), but I think perhaps the exact cases that aren't working now might not work if we did that. They have short-circuilts to fire immediately without waiting an eventloop tick, which is an important performance issue.

#1551 defers event loop retrieval to every method call, rather than init time. I tried get_running_loop, but since it means asyncio.run(poller.poll())  won't work, I don't think it's the right approach.

So are the options now just try to delay it to the first send/receive to cover a few more standard use-cases and/or add more documentation to identify what requirements are around setting up the event loop?

#1551 takes the approach to always retrieve the current loop, so it should work with consecutive asyncio.run() calls, etc. Anywhere you call an async method should work after that.

Oh, sorry I misunderstood that. Thanks, and let me know if I can do anything to test or document.

Awesome, thank you! If you want to take #1551 for a spin and make sure it works for you, I think I can land it and everything should work in a more expected manner now. If you find somewhere in the docs where you think caveats and explanations would help, that's always welcome.

authors: gramhagen minrk

repo: zeromq/pyzmq


text:
Demo Page Renders README Instead Now

https://zeroturnaround.github.io/sql-formatter/ now renders the README instead of displaying the demo page.

Yep, sorry about that. I accidentally messed it up when merging in a major rewrite.
I'll try to get the demo page back up.

source: gharchive/issue

authors: jcgoette nene

repo: zeroturnaround/sql-formatter

license: mit

license_type: permissive

license_source: bigquery


text:
absoluteOrientationUpdateInterval has no effect

It seems like changing absoluteOrientationUpdateInterval has no effect on Android.
At least myFunction in motionSensors.absoluteOrientation.listen(myFunction); is called rapidly regardless of the value I set in absoluteOrientationUpdateInterval.
Tested on Android Emulator with API 29 and on real device running latest Android 10.

seems a bug @zesage
motionSensors.absoluteOrientationUpdateInterval actually affects the motionSensors.orientation.listen()

license_source: github-api


text:
re-instate 'make publish'

and call it from the release script
Closes #331.

There are a few commits on master leading up to this.
@squaremo I would appreciate some help in testing.

do something
follow release process
do something else

What exactly do I need to do in 1+3 such that the above leaves no trace behind anywhere? Not on my machine, not in my github account/repos, not in my dockerhub account, and certainly not in the zettio accounts.
I know I can override GITHUB_USER and DOCKERHUB_USER, but that is not quite enough to accomplish the above, is it?

What exactly do I need to do [...] such that [testing the release process] leaves no trace behind anywhere?

I suggest we document that in the wiki, since this won't be the last time we are making changes that affect the release process.

https://github.com/zettio/weave/wiki/TestingReleaseProcess

Waiting for weavetools image to build.

LGTM.

source: gharchive/pull-request

authors: rade squaremo

repo: zettio/weave


text:
编译Zeusee-Face-Anti-spoofing下Prj-Android-full-src工程时，遇到了error: undefined reference to 'cv::dnn::experimental_dnn_v5::Net::forward(cv::_OutputArray const&, std::__ndk1::vector<cv::String, std::__ndk1::allocatorcv::String > const&)'错误

最终问题分析：Andriod Studio 3.4中的最新ndk缺少opencv编译的工具链，需要将ndk回退到16版本，即可以。

E/cv::error(): OpenCV(3.4.2) Error: Unspecified error (FAILED: fs.is_open(). Can't open "/sdcard/AliveDetection/det1.prototxt") in bool cv::dnn::ReadProtoFromTextFile(const char*, google::protobuf::Message*), file /build/3_4_pack-android/opencv/modules/dnn/src/caffe/caffe_io.cpp, line 1121
A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 22196 (activedetection)

repo: zeusees/Zeusee-Face-Anti-spoofing


text:
🛑 JSONDiff Base is down

In f106c18, JSONDiff Base (https://jsondiff.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: JSONDiff Base is back up in 534dc08 after 6 minutes.

repo: zgrossbart/jdd-upptime

license: MIT


text:
match太灵活了

比如“百度网盘”四个字，这里面只有“度”是多音字，也就是说可以是，baiduwangpan、baiduowangpan，首字母是bdwp，我输入oa两个字母的时候也能match上，很费解，虽然是有duo这个拼音，但是起码是我输入duo之后再匹配上。

感谢反馈，我看看这周内为 match api 增加一个控制匹配灵活的参数

@zh-lx 希望可以全拼匹配、首字母匹配，这两种，目前的match太灵敏了，我试了一下，搜出了好多无效数据，根本不搭边的。

好的

感谢反馈，已在 #106 中重写了 match API 支持该功能，欢迎体验

authors: fanchenio zh-lx

repo: zh-lx/pinyin-pro


text:
online/cgform/** 接口405

版本号：2.1.0
问题描述：online/cgform/** 所有的接口全部无法访问，而且在后台也没有搜到这些接口
截图&代码：

友情提示： 未按格式要求发帖，会直接删掉。

请不要发重复的问题
https://github.com/zhangdaiscott/jeecg-boot/issues/563

请不要发重复的问题
#563

没有解决我的问题啊

我这边也遇到这个问题，但是看了563没能解决问题。应该是题主改了包路径导致的吧？

请不要发重复的问题
#563

没有解决我的问题啊

online/cgform/**  这个类型的接口后台在哪找到了么？

authors: Tyebile dreamGitCJB wkeyword zhangdaiscott

repo: zhangdaiscott/jeecg-boot


text:
How to Utilize a Pointer Combining Two Structs?

I am using a third-party C++ library that provides the following structures
typedef struct
{
short x, y, dir;
unsigned char kind;
} MINUTIA;
typedef struct {
short nNumber;
MINUTIA item[150];
} MINUTIAE, *LPMINUTIAE;
I need to create an LPMINUTIAE pointer using these structures. Could you provide guidance or an example on how to achieve this with ffi-rs? I'm not quite sure how to proceed.
Thank you in advance for your help!

ffi-rs doesn't support struct array at this time. I will support it later

I will support it this week

Support structArray in ffi-rs@1.2.0
https://github.com/zhangyuang/node-ffi-rs/blob/master/tests/struct.ts#L78
https://github.com/zhangyuang/node-ffi-rs/blob/master/cpp/sum.cpp#L259

@zhangyuang Oh, thank you! I didn't expect this improvement to be implemented so quickly. I’ll start using it right away and share the test results with you soon. Thanks a lot!"

@zhangyuang  I just tested it, and it works great. The pointer creation and restorePointer functions also work perfectly. Thank you so much!

@zhangyuang  I just tested it, and it works great. The pointer creation and restorePointer functions also work perfectly. Thank you so much!

authors: HoseonChu zhangyuang

repo: zhangyuang/node-ffi-rs


text:
🛑 ZY is down

In 56915a3, ZY (https://ziyuan.baidu.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: ZY is back up in 37adea9 after 8 minutes.

repo: zhaodylan/uptime-ziyuan


text:
🛑 ZY is down

In c2d9bf4, ZY (https://ziyuan.baidu.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: ZY is back up in 1fcfb85.


text:
Log in time out, reloading QR code. 二维码一直刷新，手机来不及登录

无限Log in time out, reloading QR code.
无论切换网络环境还是切换账号，手速再快都会超时。

可以登录了，但是又遇到了bot不回复的问题

可以登录了，但是又遇到了bot不回复的问题

可以贴下日志，或者直接加我哈

可以登录了，但是又遇到了bot不回复的问题

拉下最新的代码试试，说不定问题解决了

itchat是不改源码了 没找到login的函数55

华为云部署的，是不是要开放什么端口？

二维码手机扫码确认后，就出现  Log in time out, reloading QR code.
Getting uuid of QR code.
Downloading QR code.

无限Log in time out, reloading QR code. 无论切换网络环境还是切换账号，手速再快都会超时。
这个要如何解决呢，一直是这样的

二维码中间有一些乱码，扫描没反应咋整

请问这个二维码通过微信扫不出来有什么好办法解决吗

@heyanfeng 你这个解决了么，咋搞的

登录之后，给微信发信息并没有回复啊

在命令行的二维码出现乱码时，可以要程序根目录里找到QR.png文件，直接打开扫码即可

itchat的一个已知问题，参考 littlecodersh/ItChat#970 和 why2lyj/ItChat-UOS#14
临时方案可以在 itchat/components/login.py 的 login() 函数中，在进入 while not isLoggedIn 循环前增加一个time.sleep(15)

如何找到 itchat 源码并修改？
1.先找到安装路径
pip3 show itchat-uos

输出的Location字段就是安装路径， 在我的ubuntu服务器上该值是 /usr/local/lib/python3.7/site-packages
源码的完整路径为：/usr/local/lib/python3.7/site-packages/itchat/components/login.py

注意：pip3 必须属于 用来启动程序的python，否则修改无效。有多版本python的环境需要注意这一点。

2. 修改代码
修改login.py 中的 login函数，在 while not isLoggedIn 循环前加上一个sleep(15)， 代码在第59行。

我写了一个自动修改的bash 脚本
`#!/bin/bash
Define the file name and the line number
pack_dir="$(pip3 show itchat-uos | grep "Location" | awk '{print $2}')"
file_name="${pack_dir}/itchat/components/login.py"
line_number=59
Define the line of code to be inserted
code="time.sleep(15)"
line_of_code="\ \ \ \ \ \ \ \ $code"
Use the sed command to insert the line
sed -i "${line_number}i ${line_of_code}" "${file_name}"
Define the start and end line numbers
start_line=50
end_line=70
Use the sed command to print the desired lines
sed -n "${start_line},${end_line}p" "${file_name}"
`

手速只要快，二维码不是事

大佬这个我换了个远程端shh窗口就好了

大佬我微信小号已经实名过了为什么还是登不上

生成的二维码是空格和'\u2005'拼接的，总体是个长方形，比例不对

安装 itchat-uos 后

Please scan the QR code to log in.
Please press confirm on your phone.
[ERROR][2023-02-13 12:44:44][app.py:19] - App startup failed!
[ERROR][2023-02-13 12:44:44][app.py:20] - list index out of range
Traceback (most recent call last):
File "app.py", line 17, in
channel.startup()
File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup
itchat.auto_login(enableCmdQR=2)
File "/usr/local/lib/python3.7/dist-packages/itchat/components/register.py", line 36, in auto_login
loginCallback=loginCallback, exitCallback=exitCallback)
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 61, in login
status = self.check_login()
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 152, in check_login
if process_login_info(self, r.text):
File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 197, in process_login_info
skey = re.findall('(.*?)', r.text, re.S)[0]
IndexError: list index out of range

请问这个二维码通过微信扫不出来有什么好办法解决吗

@heyanfeng 你这个解决了么，咋搞的

我的笔记本是这样，台式电脑是正常的

请问这个二维码通过微信扫不出来有什么好办法解决吗

在wechat_channel.py中将enableCmdQR=2就好了，等于3就这样

[ERROR][2023-02-14 17:09:35][open_ai_bot.py:89] - module 'openai' has no attribute 'Image'
Traceback (most recent call last):
File "/root/chatgpt-on-wechat/bot/openai/open_ai_bot.py", line 72, in create_img
response = openai.Image.create(
怎么解决？

我的登录出现以下报错，扫描还是登录不了，197 行代码到底什么错误？看不懂
Please scan the QR code to log in.
Please press confirm on your phone.
[ERROR][2023-02-15 09:52:16][app.py:19] - App startup failed!
[ERROR][2023-02-15 09:52:16][app.py:20] - list index out of range
Traceback (most recent call last):
File "app.py", line 17, in
channel.startup()
File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup
itchat.auto_login(enableCmdQR=2)
File "/usr/local/lib/python3.8/dist-packages/itchat/components/register.py", line 35, in auto_login
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 61, in login
status = self.check_login()
File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 152, in check_login
if process_login_info(self, r.text):
File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 197, in process_login_info
skey = re.findall('(.*?)', r.text, re.S)[0]
IndexError: list index out of range

需要实名验证下

Please scan the QR code to log in. Please press confirm on your phone. [ERROR][2023-02-13 12:44:44][app.py:19] - App startup failed! [ERROR][2023-02-13 12:44:44][app.py:20] - list index out of range Traceback (most recent call last): File "app.py", line 17, in channel.startup() File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "/usr/local/lib/python3.7/dist-packages/itchat/components/register.py", line 36, in auto_login loginCallback=loginCallback, exitCallback=exitCallback) File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 61, in login status = self.check_login() File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 152, in check_login if process_login_info(self, r.text): File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 197, in process_login_info skey = re.findall('(.*?)', r.text, re.S)[0] IndexError: list index out of range

微信实名验证下就好了

docker部署的如何找到login.py修改？

在 Dockerfile.alpine 文件 && pip install --upgrade openai 下面加一行

RUN sed -i "59i \ \ \ \ \ \ \ \ time.sleep(15)" /usr/local/lib/python3.7/site-packages/itchat/components/login.py

我的登录出现以下报错，扫描还是登录不了，197 行代码到底什么错误？看不懂 Please scan the QR code to log in. Please press confirm on your phone. [ERROR][2023-02-15 09:52:16][app.py:19] - App startup failed! [ERROR][2023-02-15 09:52:16][app.py:20] - list index out of range Traceback (most recent call last): File "app.py", line 17, in channel.startup() File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "/usr/local/lib/python3.8/dist-packages/itchat/components/register.py", line 35, in auto_login self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback, File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 61, in login status = self.check_login() File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 152, in check_login if process_login_info(self, r.text): File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 197, in process_login_info skey = re.findall('(.*?)', r.text, re.S)[0] IndexError: list index out of range

微信实名认证之后，登录成功，然后愉快的玩了2天，第3天微信给出了警告，严禁微信挂载非官方认证的插件运行，并临时限制了微信的功能，重新解除限制之后，再次扫码登录就出现机器人经常回复断线的情况了。很担心再次封号。

 二维码中间有一些乱码，扫描没反应咋整

把二维码切屏，然后用编辑软件调整一下高度，就可以扫描了；记得调整二维码显示时间，否则来不及，估计调整到30秒则可

""pip3 必须属于 用来启动程序的python，否则修改无效。有多版本python的环境需要注意这一点""求大佬 怎么查看用来启动的python，怎么修改启动python
[root@VM-16-11-centos chatgpt-on-wechat]# python3 --version
Python 3.6.8
[root@VM-16-11-centos chatgpt-on-wechat]# python --version
bash: python: command not found
[root@VM-16-11-centos chatgpt-on-wechat]# python2 --version
Python 2.7.5
[root@VM-16-11-centos chatgpt-on-wechat]# which python
/usr/bin/which: no python in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
[root@VM-16-11-centos chatgpt-on-wechat]# whereis python
python: /usr/bin/python3.6m /usr/bin/python3.6 /usr/bin/python /usr/bin/python.bak /usr/bin/python2.7 /usr/lib/python3.6 /usr/lib/python2.7 /usr/lib64/python3.6 /usr/lib64/python2.7 /etc/python /usr/local/lib/python3.6 /usr/include/python3.6m /usr/include/python2.7 /usr/share/man/man1/python.1.gz
[root@VM-16-11-centos chatgpt-on-wechat]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
[root@VM-16-11-centos chatgpt-on-wechat]# ls -l $(which python3)
lrwxrwxrwx 1 root root 9 Apr  1  2022 /usr/bin/python3 -> python3.6
[7]   Done                    nohup python3 app.py
[root@VM-16-11-centos chatgpt-on-wechat]# python3 -c "import sys; print(sys.prefix)"
/usr
[root@VM-16-11-centos chatgpt-on-wechat]# export PATH=/usr/bin:$PATH
##我已经将python3添加到path中了，但是 执行上面脚本添加15秒时间仍是不管用，超级快就刷下一个QR了

Please scan the QR code to log in. Please press confirm on your phone. [ERROR][2023-02-13 12:44:44][app.py:19] - App startup failed! [ERROR][2023-02-13 12:44:44][app.py:20] - list index out of range Traceback (most recent call last): File "app.py", line 17, in channel.startup() File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "/usr/local/lib/python3.7/dist-packages/itchat/components/register.py", line 36, in auto_login loginCallback=loginCallback, exitCallback=exitCallback) File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 61, in login status = self.check_login() File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 152, in check_login if process_login_info(self, r.text): File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 197, in process_login_info skey = re.findall('(.*?)', r.text, re.S)[0] IndexError: list index out of range

我也是这样，什么情况?

Please scan the QR code to log in. Please press confirm on your phone. [ERROR][2023-02-13 12:44:44][app.py:19] - App startup failed! [ERROR][2023-02-13 12:44:44][app.py:20] - list index out of range Traceback (most recent call last): File "app.py", line 17, in channel.startup() File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup itchat.auto_login(enableCmdQR=2) File "/usr/local/lib/python3.7/dist-packages/itchat/components/register.py", line 36, in auto_login loginCallback=loginCallback, exitCallback=exitCallback) File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 61, in login status = self.check_login() File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 152, in check_login if process_login_info(self, r.text): File "/usr/local/lib/python3.7/dist-packages/itchat/components/login.py", line 197, in process_login_info skey = re.findall('(.*?)', r.text, re.S)[0] IndexError: list index out of range

我也是这样，什么情况?

https://github.com/zhayujie/chatgpt-on-wechat/issues/8#issuecomment-1358893794

docker部署的如何找到login.py修改？

在docker file 中执行我写的bash脚本

itchat的一个已知问题，参考 littlecodersh/ItChat#970 和 why2lyj/ItChat-UOS#14
临时方案可以在 itchat/components/login.py 的 login() 函数中，在进入 while not isLoggedIn 循环前增加一个time.sleep(15)

如何找到 itchat 源码并修改？
1.先找到安装路径
pip3 show itchat-uos

输出的Location字段就是安装路径， 在我的ubuntu服务器上该值是 /usr/local/lib/python3.7/site-packages
源码的完整路径为：/usr/local/lib/python3.7/site-packages/itchat/components/login.py

注意：pip3 必须属于 用来启动程序的python，否则修改无效。有多版本python的环境需要注意这一点。

2. 修改代码
修改login.py 中的 login函数，在 while not isLoggedIn 循环前加上一个sleep(15)， 代码在第59行。

========================================================================
#回复：修改login.py 中的 login函数，在 while not isLoggedIn 循环前加上一个sleep(15)， 代码在第59行。
添加这个会报错。个人的做法是搜索login.py文件中两处time.sleep(1)，把它们都改成time.sleep(5)，问题解决。

这个在自家电脑搭建好了，一直使用，会导致在哪个环节扣费吗？

LOCATION=$(pip3 show itchat-uos | grep Location | cut -d ' ' -f 2)
sed -i '/isLoggedIn = False/ a\        time.sleep(15)' $LOCATION/itchat/components/login.py
sed -i '/isLoggedIn = False/ a\        asyncio.sleep(15)' $LOCATION/itchat/async_components/login.py
sed -i '/if isLoggedIn:/ i\            time.sleep(1)' $LOCATION/itchat/components/login.py
sed -i '/if isLoggedIn:/ i\            asyncio.sleep(1)' $LOCATION/itchat/async_components/login.py

https://github.com/littlecodersh/ItChat/issues/971

Please scan the QR code to log in.
Please press confirm on your phone.
[ERROR][2023-03-05 10:33:51][app.py:19] - App startup failed!
[ERROR][2023-03-05 10:33:51][app.py:20] - mismatched tag: line 64, column 4
Traceback (most recent call last):
File "app.py", line 17, in
channel.startup()
File "/root/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 37, in startup
itchat.auto_login(enableCmdQR=2)
File "/usr/local/lib/python3.8/dist-packages/itchat/components/register.py", line 35, in auto_login
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 53, in login
status = self.check_login()
File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 137, in check_login
if process_login_info(self, r.text):
File "/usr/local/lib/python3.8/dist-packages/itchat/components/login.py", line 172, in process_login_info
for node in xml.dom.minidom.parseString(r.text).documentElement.childNodes:
File "/usr/lib/python3.8/xml/dom/minidom.py", line 1969, in parseString
return expatbuilder.parseString(string)
File "/usr/lib/python3.8/xml/dom/expatbuilder.py", line 925, in parseString
return builder.parseString(string)
File "/usr/lib/python3.8/xml/dom/expatbuilder.py", line 223, in parseString
parser.Parse(string, True)
xml.parsers.expat.ExpatError: mismatched tag: line 64, column 4

各位遇到过吗

 各位遇到过吗

同问，我也是

登录之后，给微信发信息并没有回复啊

微信没有返回，有解决吗

改了第59行代码，正常运行了几天。但是今天突然不行，第59行代码改了，还是timeout，怎么解决啊？

风控了吗

大佬们我输入命令要扫二维码那个后出来这个，也没有二维码，说Address already in use
[root@iZ2ze4nucubxhzwcgxolpsZ bot-on-anything]# nohup python3 app.py & tail -f nohup.out
[4] 26247
nohup: ignoring input and appending output to ‘nohup.out’
HTTPServer.server_bind(self)
File "/usr/local/lib/python3.8/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/local/lib/python3.8/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
Bottle v0.12.25 server starting up (using AutoServer())...
Listening on http://0.0.0.0:80/
Hit Ctrl-C to quit.
载入环节
{'model': {'type': 'chatgpt', 'openai': {'api_key': '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', 'proxy': 'http://127.0.0.1:15777', 'single_chat_prefix': ['bot', '@bot'], 'conversation_max_tokens': 1000, 'character_desc': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题，并且可以使用多种语言与人交流。'}}, 'channel': {'type': 'wechat_mp', 'wechat_mp': {'token': '12345678', 'port': '80'}}}
[INFO][2023-03-22 22:26:10][log.py:34] - [INIT] Start up: chatgpt on wechat_mp
[INFO][2023-03-22 22:26:10][wechat_mp_channel.py:44] - [WX_Public] Wechat Public account service start!
[ERROR][2023-03-22 22:26:10][log.py:45] - App startup failed!
[ERROR][2023-03-22 22:26:10][log.py:50] - [Errno 98] Address already in use
Traceback (most recent call last):
File "app.py", line 27, in
channel.startup()
File "/root/bot-on-anything/channel/wechat/wechat_mp_channel.py", line 47, in startup
robot.run()
File "/usr/local/lib/python3.8/site-packages/werobot/robot.py", line 686, in run
self.wsgi.run(server=server, host=host, port=port)
File "/usr/local/lib/python3.8/site-packages/bottle.py", line 767, in run
run(self, **kwargs)
File "/usr/local/lib/python3.8/site-packages/bottle.py", line 3175, in run
server.run(app)
File "/usr/local/lib/python3.8/site-packages/bottle.py", line 3026, in run
return sa(self.host, self.port, **self.options).run(handler)
File "/usr/local/lib/python3.8/site-packages/bottle.py", line 2801, in run
srv = make_server(self.host, self.port, app, server_cls, handler_cls)
File "/usr/local/lib/python3.8/wsgiref/simple_server.py", line 154, in make_server
server = server_class((host, port), handler_class)
File "/usr/local/lib/python3.8/socketserver.py", line 452, in init
self.server_bind()
File "/usr/local/lib/python3.8/wsgiref/simple_server.py", line 50, in server_bind
HTTPServer.server_bind(self)
File "/usr/local/lib/python3.8/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
File "/usr/local/lib/python3.8/socketserver.py", line 466, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
Bottle v0.12.25 server starting up (using AutoServer())...
Listening on http://0.0.0.0:80/
Hit Ctrl-C to quit.

微信可以登录上去，当时一直只回复我连接不到你的网络，我用的是阿里云服务器，ip填了，端口那里没填，请问这样是什么问题

docker部署的如何找到login.py修改？

在docker file 中执行我写的bash脚本

容器中执行报错了：
WARNING: Package(s) not found: itchat-uos
sed: can't read /itchat/components/login.py: No such file or directory
sed: can't read /itchat/components/login.py: No such file or directory

docker部署的如何找到login.py修改？

在docker file 中执行我写的bash脚本

容器中执行报错了： WARNING: Package(s) not found: itchat-uos sed: can't read /itchat/components/login.py: No such file or directory sed: can't read /itchat/components/login.py: No such file or directory

应该是Bash权限问题,我也遇到了

群晖docker 修改login.py 的已知方案是在 SSH中打开 /volume1/@docker/btrfs/subvolumes 目录，使用 du -h –max-depth=1 * 查询目录下所有的文件及大小，查询输出信息找到对应的文件目录，进去修改login.py 。如果你进入的目录下没有login.py 或者打开是空文件则目录错误，继续寻找。

请问这个二维码通过微信扫不出来有什么好办法解决吗
同级目录下有个qr的图片直接扫就行

同级目录下有个qr的图片会刷新，二维码排版错误主要是终端问题，更换xshell或finalshell试试
从 Windows 版邮件https://go.microsoft.com/fwlink/?LinkId=550986发送
发件人: @.>
发送时间: 2023年8月30日 11:46
收件人: @.>
抄送: @.>; @.>
主题: Re: [zhayujie/chatgpt-on-wechat] Log in time out, reloading QR code. 二维码一直刷新，手机来不及登录 (Issue #8)
[image]https://user-images.githubusercontent.com/33289550/216936168-5f0fd7a7-0cfe-4668-8e28-4335b9a237db.png
请问这个二维码通过微信扫不出来有什么好办法解决吗
同级目录下有个qr的图片直接扫就行
―
Reply to this email directly, view it on GitHubhttps://github.com/zhayujie/chatgpt-on-wechat/issues/8#issuecomment-1698444513, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APFIA74BUPKRKPKVLEYKZ23XX2ZSFANCNFSM6AAAAAATED2RNU.
You are receiving this because you commented.Message ID: @.***>

itchat的一个已知问题，参考 littlecodersh/ItChat#970 和 why2lyj/ItChat-UOS#14
临时方案可以在 itchat/components/login.py 的 login() 函数中，在进入 while not isLoggedIn 循环前增加一个time.sleep(15)

如何找到 itchat 源码并修改？
1.先找到安装路径
pip3 show itchat-uos

输出的Location字段就是安装路径， 在我的ubuntu服务器上该值是 /usr/local/lib/python3.7/site-packages
源码的完整路径为：/usr/local/lib/python3.7/site-packages/itchat/components/login.py

注意：pip3 必须属于 用来启动程序的python，否则修改无效。有多版本python的环境需要注意这一点。

2. 修改代码
修改login.py 中的 login函数，在 while not isLoggedIn 循环前加上一个sleep(15)， 代码在第59行。

修改后报错：
Getting uuid of QR code.
Downloading QR code.
Please scan the QR code to log in.
Traceback (most recent call last):
File "D:\pycode\test_code\itchat\test.py", line 10, in
itchat.auto_login()
File "D:\Software\miniconda3\envs\itchat\lib\site-packages\itchat\components\register.py", line 35, in auto_login
self.login(enableCmdQR=enableCmdQR, picDir=picDir, qrCallback=qrCallback,
File "D:\Software\miniconda3\envs\itchat\lib\site-packages\itchat\components\login.py", line 56, in login
status = self.check_login()
File "D:\Software\miniconda3\envs\itchat\lib\site-packages\itchat\components\login.py", line 142, in check_login
if process_login_info(self, r.text):
File "D:\Software\miniconda3\envs\itchat\lib\site-packages\itchat\components\login.py", line 184, in process_login_info
core.loginInfo['wxsid'] = core.loginInfo['BaseRequest']['Sid'] = cookies["wxsid"]
KeyError: 'wxsid'
我是在windows10的pycharm中测试的代码
import itchat
itchat.auto_login()
itchat.send('Hello, filehelper', toUserName='filehelper')
请问这个错误应该怎么解决啊？

repo: zhayujie/chatgpt-on-wechat


text:
added support for lpar start command

added missing support for lpar start group command

@saiprasanna-16
PR #545 fixes the safety issues that cause the failures for this PR.
Please rebase the PR to latest master, resolve the merge conflict, and then it should pass the test.

coverage: 37.06% (+0.02%) from 37.036%
when pulling 4e6c3eddbb178a66a27d2158e06849ed8294597a on lpar-start
into 7a1ab9ff79739c02d00d753728156961f6fecd6e on master.

authors: andy-maier coveralls saiprasanna-16

repo: zhmcclient/zhmccli


text:
特殊请求

大神，支持@POST，但是参数是@QueryMap的方式吗？还是只能在URL后面自己拼接?
还有其他的，比如@PUT，但参数是@Body的

已经支持了
2017-07-19 22:38 GMT+08:00 alvis notifications@github.com:

大神，支持@post https://github.com/post，但是参数是@querymap的方式吗？还是只能在URL后面自己拼接?
还有其他的，比如@put https://github.com/put，但参数是@Body https://github.com/body的
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/zhou-you/RxEasyHttp/issues/6, or mute the thread
https://github.com/notifications/unsubscribe-auth/AOgbi7vqudsYOs1CJZPzGT-v6Y2XDvbVks5sPhT_gaJpZM4Oc1Dp
.

authors: congai zhou-you

repo: zhou-you/RxEasyHttp


text:
ABI override no longer works on Android 13

ABI override with IActivityManager.startInstrumentation(..., abiOverride = ...) will no longer work since Android 13 because of the following check in ActivityManagerService.java.
            if (!Build.IS_DEBUGGABLE && callingUid != ROOT_UID && callingUid != SHELL_UID
                    && callingUid != SYSTEM_UID && !hasActiveInstrumentationLocked(callingPid)) {
                // If it's not debug build and not called from root/shell/system uid, reject it.
                final String msg = "Permission Denial: instrumentation test "
                        + className + " from pid=" + callingPid + ", uid=" + callingUid
                        + ", pkgName=" + mInternal.getPackageNameByPid(callingPid)
                        + " not allowed because it's not started from SHELL";
                Slog.wtfQuiet(TAG, msg);
                reportStartInstrumentationFailureLocked(watcher, className, msg);
                throw new SecurityException(msg);
            }

Attempts to call startInstrumentation will fail with the following exception.
java.lang.SecurityException: Permission Denial: instrumentation test ComponentInfo{net.zhuoweizhang.mcpelauncher/net.zhuoweizhang.mcpelauncher.RelaunchInstrumentation} from pid=15401, uid=10591, pkgName=net.zhuoweizhang.mcpelauncher not allowed because it's not started from SHELL
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3040)
	at android.os.Parcel.createException(Parcel.java:3024)
	at android.os.Parcel.readException(Parcel.java:3007)
	at android.os.Parcel.readException(Parcel.java:2949)
	at android.app.IActivityManager$Stub$Proxy.startInstrumentation(IActivityManager.java:5500)

This disables any attempt to run Instrumentation without a shell/system/root uid on a production device.
Any possible solutions/alternative for that?

the blocklauncher does not work not only on android 13, but on all its versions above the eighth for a variety of different problems, and obviously no one is going to fix it. if you need scripting functionality so much, then it's easier to write your own launcher from scratch using a relay system and android capabilities.

Blocklauncher is very outdated and it is not possible to use it now

Frankly, I'm not going to run Minecraft or load scripts. I'm just looking for an approach about dynamically switching ABI in my own app, and that is not much related with Minecraft. The only implementation I have ever seen is MCPELauncher and sadly the method it uses doesn't work on Android 13. I hadn't ever seen any other applications being able to archive this.
For your information, this is a bug fix for  CVE-2023-21089. This bug fix may be backported to Android 11 and 12 so that older versions may be also affected.

authors: cinit nikolay-keenetic

repo: zhuowei/MCPELauncher


text:
Fails to build on Python 3.11 RC2: fatal error: longintrepr.h: No such file or directory

Cannot get this package to build on Python 3.11:
Upstream: https://github.com/home-assistant/core/pull/74650
Build output:
  Building wheel for guppy3 (setup.py): started
  Building wheel for guppy3 (setup.py): finished with status 'error'
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [96 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/guppy
      copying guppy/_version.py -> build/lib.linux-x86_64-cpython-311/guppy
      copying guppy/__init__.py -> build/lib.linux-x86_64-cpython-311/guppy
      creating build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/etc.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/xterm.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/IterPermute.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/Cat.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
  Running setup.py clean for guppy3
      copying guppy/etc/RE.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/KanExtension.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/textView.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/Glue.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/FSA.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/RE_Rect.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/Help.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/KnuthBendix.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/Code.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/Descriptor.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/cmd.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/__init__.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      copying guppy/etc/tkcursors.py -> build/lib.linux-x86_64-cpython-311/guppy/etc
      creating build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Exceptions.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Document.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Main.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Latex.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Html.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/SpecNodes.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/FileIO.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Filer.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Tester.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Help.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/DottedTree.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Text.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/XHTML.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/Gsml.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      copying guppy/gsl/__init__.py -> build/lib.linux-x86_64-cpython-311/guppy/gsl
      creating build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Part.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/pbhelp.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Classifiers.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/RefPat.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/UniSet.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Spec.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Doc.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Use.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Console.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Remote.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Monitor.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Prof.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/OutputHandling.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/RM.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/View.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Path.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/RemoteConstants.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/ImpSet.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/Target.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      copying guppy/heapy/__init__.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy
      creating build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_menuleak.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_Classifiers.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_all.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_View.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_OutputHandling.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_gsl.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_RetaGraph.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_heapyc.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_ER.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_Path.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_RefPat.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_Spec.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_dependencies.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_UniSet.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_sf.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/test_Part.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/support.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      copying guppy/heapy/test/__init__.py -> build/lib.linux-x86_64-cpython-311/guppy/heapy/test
      creating build/lib.linux-x86_64-cpython-311/guppy/sets
      copying guppy/sets/test.py -> build/lib.linux-x86_64-cpython-311/guppy/sets
      copying guppy/sets/__init__.py -> build/lib.linux-x86_64-cpython-311/guppy/sets
      running build_ext
      building 'guppy.sets.setsc' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/src
      creating build/temp.linux-x86_64-cpython-311/src/sets
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/runner/work/core/core/venv/include -I/opt/hostedtoolcache/Python/3.11.0-rc.2/x64/include/python3.11 -c src/sets/bitset.c -o build/temp.linux-x86_64-cpython-311/src/sets/bitset.o
      src/sets/bitset.c:7:10: fatal error: longintrepr.h: No such file or directory
          7 | #include "longintrepr.h"
            |          ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

Ref: https://github.com/cython/cython/issues/4461

I haven't had time to try to add Python 3.11 compatibility yet. I'll look into this.

This one should be solvable by a simple cython bump

@zhuyifei1999 do you have rough ETA when you'll be able to have a look on the issue? Thanks for any info!

This one should be solvable by a simple cython bump

guppy doesn't use cython. It's direct C code using CPython API.

@zhuyifei1999 do you have rough ETA when you'll be able to have a look on the issue? Thanks for any info!

Let me try this weekend.

The frame optimization in Python 3.11 in https://github.com/python/cpython/issues/88756 made it quite a bit more difficult to support it. Guppy needs the ability to read all locals and globals of all stack frames for traversing purposes, and knowing names of variables (the "relate" part of guppy).
Previously this was easy: Every frame will have a Python-visible frame object, so we can traverse the rootstate for frame objects: https://github.com/zhuyifei1999/guppy3/blob/4cb9fcb5d75327544a6875b6caabfdffb70a7e29/src/heapy/rootstate.c#L309-L322
and then let frame object traversal do its thing:
https://github.com/zhuyifei1999/guppy3/blob/4cb9fcb5d75327544a6875b6caabfdffb70a7e29/src/heapy/stdtypes.c#L199-L270
But now I need to do frame attributes as "rootstate" attributes since all the intermediate structs are not Python-visible objects. And It's not just traverse I need to implement (the pre-3.11 I can just trverse to the most recent frame object and it'll recursively traverse its f_back, but now I can't rely on this), but also "relate" (finding names of objects), getattr, and dir()...
I'll keep working on it.

With Python 3.11 becoming more commonly used (especially because of performance improvements), we are looking forward to starting to support it as well.
Not wanting to push this issue or change in any way, is there anything to report on the progress of this issue? (please don't feel pushed, I'm just trying to get information).
../Frenck

My apologies it's been on my backburner for way too long. I always had other things to work on that I find more interesting :/
I'll get to it soon.

Note to self: Whatever I do here will be broken again by https://github.com/python/cpython/commit/1e197e63e21f77b102ff2601a549dda4b6439455 in 3.12. I need to read that commit in more detail some time.

d13f5ccf701ddf09cdb70e261b66aeb853d04daf commit above mentions an issue with localsplus. I think I need to explain this one in plain English so I can maybe ask for opinions.
As mentioned before https://github.com/python/cpython/issues/88756 in 3.11 changed how frames work. Previously we had (simplified) pystate.h frameobject.h
typedef struct _ts {
[...]
    PyFrameObject *frame;
[...]
    CFrame *cframe;
[...]
} PyThreadState;

typedef struct _frame {
    PyObject_VAR_HEAD
    struct _frame *f_back;      /* previous frame, or NULL */
    PyCodeObject *f_code;       /* code segment */
    PyObject *f_builtins;       /* builtin symbol table (PyDictObject) */
    PyObject *f_globals;        /* global symbol table (PyDictObject) */
    PyObject *f_locals;         /* local symbol table (any mapping) */
    PyObject **f_valuestack;    /* points after the last local */
    PyObject *f_trace;          /* Trace function */
[...]
    PyObject *f_localsplus[1];  /* locals+stack, dynamically sized */
} PyFrameObject;

The traversal of frames is easy. Since every Python frame is guaranteed a Python-visible "frame object", to find everything each frame uses we can just traverse into these objects. All we have to do is provide accesssors from the "RootState" to every frame in existence.
In Python 3.11 this changed. Now we have pystate.h pycore_frame.h:
typedef struct _ts {
[...]
    CFrame *cframe;
[...]
} PyThreadState;

typedef struct _PyCFrame {
[...]
    struct _PyInterpreterFrame *current_frame;
[...]
} _PyCFrame;

typedef struct _PyInterpreterFrame {
    /* "Specials" section */
    PyFunctionObject *f_func; /* Strong reference */
    PyObject *f_globals; /* Borrowed reference */
    PyObject *f_builtins; /* Borrowed reference */
    PyObject *f_locals; /* Strong reference, may be NULL */
    PyCodeObject *f_code; /* Strong reference */
    PyFrameObject *frame_obj; /* Strong reference, may be NULL */
    /* Linkage section */
    struct _PyInterpreterFrame *previous;
[...]
    /* Locals and stack */
    PyObject *localsplus[1];
} _PyInterpreterFrame;

typedef struct _frame {
    PyObject_HEAD
    PyFrameObject *f_back;      /* previous frame, or NULL */
    struct _PyInterpreterFrame *f_frame; /* points to the frame data */
    PyObject *f_trace;          /* Trace function */
[...]
    PyObject *_f_frame_data[1];
} PyFrameObject;

Most of the interesting values are in _PyInterpreterFrame which is no longer an object.
Why is this an issue? Guppy has a feature that it can figure out how to reach an object for memory analysis purposes. Internally this is called "relate", which I think means figuring out the relationship in the path of the traversal. In the README we have
>>> from guppy import hpy; h=hpy()
>>> h.heap().byid[0].sp
 0: h.Root.i0_modules['os'].__dict__

sp shows the shortest path to each an object from the "RootState". This is one of the many uses of "relate". Another great one is the "Via" classifier:
>>> h.heap()
[...]
>>> _.byvia
Partition of a set of 37968 objects. Total size = 4480344 bytes.
 Index  Count   %     Size   % Cumulative  % Referred Via:
     0   1144   3   456096  10    456096  10 '.__dict__'
     1   2331   6   412466   9    868562  19 '.__code__'
     2   2668   7   254698   6   1123260  25 '.co_code'
     3   2088   5   168888   4   1292148  29 '.co_names'
     4    637   2   159671   4   1451819  32 '.__doc__', '[0]'
     5    514   1   157669   4   1609488  36 "['__doc__']"
     6   1856   5   130485   3   1739973  39 '.__qualname__'
     7   1571   4   111336   2   1851309  41 '.co_consts'
     8   2408   6   111178   2   1962487  44 '.co_lnotab'
     9   1467   4   108416   2   2070903  46 '.co_varnames'
<7211 more rows. Type e.g. '_.more' to view.>

Let's say you have a lot of large strings; the type classifier will tell you they are strings, but it'll take you a while to find the name of these strings (i.e. the attribute / variable name that refers to these strings). Byvia makes this easy:
>>> h.heap()
Partition of a set of 38027 objects. Total size = 4484757 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0  10956  29   974101  22    974101  22 str
     1   7747  20   537504  12   1511605  34 tuple
     2    576   2   481208  11   1992813  44 type
     3   2669   7   472264  11   2465077  55 types.CodeType
     4   5240  14   377012   8   2842089  63 bytes
     5   2448   6   332928   7   3175017  71 function
     6    576   2   284384   6   3459401  77 dict of type
     7     99   0   183432   4   3642833  81 dict of module
     8    300   1   123912   3   3766745  84 dict (no owner)
     9   1138   3    81936   2   3848681  86 types.WrapperDescriptorType
<117 more rows. Type e.g. '_.more' to view.>
>>> _[0]
Partition of a set of 10956 objects. Total size = 974101 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0  10956 100   974101 100    974101 100 str
>>> _.byvia
Partition of a set of 10956 objects. Total size = 974101 bytes.
 Index  Count   %     Size   % Cumulative  % Referred Via:
     0    637   6   159671  16    159671  16 '.__doc__', '[0]'
     1    502   5   156901  16    316572  32 "['__doc__']"
     2   1856  17   130485  13    447057  46 '.__qualname__'
     3    699   6    43171   4    490228  50 'list(_)[0]'
     4    509   5    34407   4    524635  54 '[1]'
     5    422   4    30315   3    554950  57 '[2]'
     6    276   3    18602   2    573552  59 '[3]'
     7    248   2    17091   2    590643  61 '[4]'
     8    227   2    13788   1    604431  62 '.__name__', '.co_name'
     9    186   2    11737   1    616168  63 '[0]'
<2178 more rows. Type e.g. '_.more' to view.>

(In this example it's a lot of docstrings)
The problem comes when the concern is local variables. The relation originally would show <some frame>.f_locals['<the local name>']. Let's say one is in a recursion and one of the local variables (let's say it's called foo) is really large. Via would have a classification such as
     0    637   6   159671  16    159671  16 ".locals['foo']"

Now let's look at 3.11. Guppy's "RootState" maintains a wonderful property that the traversable attributes are, not only just relate-able, but also available by getattr and even dir(). This is Python 3.9:
>>> import guppy.heapy.heapyc
>>> import pprint
>>> guppy.heapy.heapyc.RootState is h.Root
True
>>> pprint.pprint(dir(h.Root))
['i0_after_forkers_child',
 'i0_after_forkers_parent',
 'i0_audit_hooks',
 'i0_before_forkers',
 'i0_builtins',
 'i0_builtins_copy',
 'i0_codec_error_registry',
 'i0_codec_search_cache',
 'i0_codec_search_path',
 'i0_dict',
 'i0_import_func',
 'i0_importlib',
 'i0_modules',
 'i0_modules_by_index',
 'i0_pyexitmodule',
 'i0_sysdict',
 'i0_t140325531354944_async_exc',
 'i0_t140325531354944_async_gen_finalizer',
 'i0_t140325531354944_async_gen_firstiter',
 'i0_t140325531354944_c_profileobj',
 'i0_t140325531354944_c_traceobj',
 'i0_t140325531354944_context',
 'i0_t140325531354944_curexc_traceback',
 'i0_t140325531354944_curexc_type',
 'i0_t140325531354944_curexc_value',
 'i0_t140325531354944_dict',
 'i0_t140325531354944_exc_traceback',
 'i0_t140325531354944_exc_type',
 'i0_t140325531354944_exc_value',
 'i0_t140325531354944_f0']
>>> h.Root.i0_t140325531354944_f0
<frame at 0x7fa013d30680, file '<stdin>', line 1, code <module>>

I want to have attribute access for all these values in _PyInterpreterFrame, so in d13f5ccf701ddf09cdb70e261b66aeb853d04daf, it is like:
>>> import guppy.heapy.heapyc
>>> import pprint
>>> pprint.pprint(guppy.heapy.heapyc.RootState)
RootState
>>> pprint.pprint(dir(guppy.heapy.heapyc.RootState))
['i0_after_forkers_child',
 'i0_after_forkers_parent',
 'i0_audit_hooks',
 'i0_before_forkers',
 'i0_builtins',
 'i0_builtins_copy',
 'i0_codec_error_registry',
 'i0_codec_search_cache',
 'i0_codec_search_path',
 'i0_dict',
 'i0_import_func',
 'i0_importlib',
 'i0_modules',
 'i0_modules_by_index',
 'i0_sysdict',
 'i0_t140336295487296_async_exc',
 'i0_t140336295487296_async_gen_finalizer',
 'i0_t140336295487296_async_gen_firstiter',
 'i0_t140336295487296_c_profileobj',
 'i0_t140336295487296_c_traceobj',
 'i0_t140336295487296_context',
 'i0_t140336295487296_curexc_traceback',
 'i0_t140336295487296_curexc_type',
 'i0_t140336295487296_curexc_value',
 'i0_t140336295487296_dict',
 'i0_t140336295487296_exc_traceback',
 'i0_t140336295487296_exc_type',
 'i0_t140336295487296_exc_value',
 'i0_t140336295487296_f0_f_builtins',
 'i0_t140336295487296_f0_f_code',
 'i0_t140336295487296_f0_f_func',
 'i0_t140336295487296_f0_f_globals',
 'i0_t140336295487296_f0_f_locals',
 'i0_t140336295487296_f0_frame_obj']

The change is that the attributes of _PyInterpreterFrame is now inlined to the RootState... but not localsplus.
A bit of background for those who are unfamiliar with Python's bytecode architecture: Python is a stack-based architecture, and very similar to Java bytecode in some ways. Instead of having some sort of registers, temporaries are stored on a stack. This is a disassembly of lambda a: a+a, with my annotations:
>>> dis.dis(lambda a: a+a)
# push(argument[0])
  1           0 LOAD_FAST                0 (a)
# push(argument[0])
              2 LOAD_FAST                0 (a)
# push(add(pop(), pop()))
              4 BINARY_ADD
# return pop()
              6 RETURN_VALUE

The first few elements of the localsplus is the local variables, and then it's the variable stack. This is why it's called localsplus. And... it's also inlined in _PyInterpreterFrame.
One might say... okay, one can just h.Root.i0_t140336295487296_f0_f_locals["foo"] right? Not really. In python, the locals dict (as f_locals) is lazy. Guppy also maintains a wonderful property that most of the paths returned by guppy, in string form, is actually valid python leading to the same object. Eg:
>>> p = h.heap().byid[0]
>>> p.sp
 0: h.Root.i0_modules['os'].__dict__
>>> h.Root.i0_modules['os'].__dict__ is p.theone
True

Now, for a frame object, Actually accessing f_locals from a frame would invoke the lazy loader for the locals dict (PyFrame_FastToLocalsWithError is the lazy loader) frameobject.c:
static PyObject *
frame_getlocals(PyFrameObject *f, void *closure)
{
    if (PyFrame_FastToLocalsWithError(f) < 0)
        return NULL;
    PyObject *locals = f->f_frame->f_locals;
    Py_INCREF(locals);
    return locals;
}

static PyGetSetDef frame_getsetlist[] = {
[...]
    {"f_locals",        (getter)frame_getlocals, NULL, NULL},
[...]
};

I'm not sure I want getattr for RootState to invoke a lazy loader, when, say, accessing i0_t140336295487296_f0_f_locals.
Another thing comes with the relate. If i0_t140336295487296_f0_f_locals["foo"] is lazy, the traverse should almost definitely not invoke the lazy loader, so i0_t140336295487296_f0_f_locals["foo"] is now a single element in the path, containing two arguments, the frame "i0_t140336295487296_f0" (interpreter 0, thread 140336295487296, frame 0), and the name of the local variable name "foo". The earlier use case of Via classifier finding the name of local variables will be very moot, as the frame is a per-process unique identifier for each frame, so the relation i0_t140336295487296_f0_f_locals["foo"] is completely unique, and Via will not group same local variable names.
One might say, we could maybe create multiple components in the path somehow. The thing is, in the path, not only the "path" itself is recorded, but every object in between are, too:
>>> p.sp
 0: h.Root.i0_modules['os'].__dict__
>>> _[0]
"%s.i0_modules['os'].__dict__"
>>> [type(t) for t in _.path]
[<class 'guppy.heapy.UniSet.IdentitySetSingleton'>, <class 'guppy.heapy.Path.Based_R_ATTRIBUTE'>, <class 'guppy.heapy.UniSet.IdentitySetSingleton'>, <class 'guppy.heapy.Path.Based_R_INDEXVAL'>, <class 'guppy.heapy.UniSet.IdentitySetSingleton'>, <class 'guppy.heapy.Path.Based_R_ATTRIBUTE'>, <class 'guppy.heapy.UniSet.IdentitySetSingleton'>]
>>> p.sp[0].path[0].theone
RootState
>>> p.sp[0].path[2].theone is h.Root.i0_modules
True
>>> p.sp[0].path[4].theone
<module 'os' from '/usr/lib/python3.9/os.py'>
>>> p.sp[0].path[6].theone is p.theone
True

Unless I want to invoke the lazy loader for every frame when guppy generates the profile, I'd need to make an IdentitySet, but for structs that are not PyObject-s. Some sort of virtual IdentitySet. Guppy doesn't support this, and I have no idea what it would take to make it happen. Could try but it's potentially very complicated.
Or alternatively, we invoke all the lazy loader for the frames when profiling. Honestly, probably not too bad of an idea considering it's an interactive profiler that's already very expensive (traverses the whole reference graph, and generates a lot of objects internally). What we would lose on is the ability to figure out which frames objects has been lazy loaded and which have not, prior to running the profiler. At least this isn't a feature regression, since for Python < 3.11 they are always loaded.
Or we drop some features...
Thoughts?
CC @svenil too

With python 3.11 already released in arch a week ago and now in manjaro testing since today the userbase is continuously growing.
@zhuyifei1999 could you please give a status update?

I was waiting for a response to https://github.com/zhuyifei1999/guppy3/issues/41#issuecomment-1408146869 then I forgot (too many things I'm working on)... oops
I guess with a lack of opinions I'll just go with the simplest solution:

Or alternatively, we invoke all the lazy loader for the frames when profiling. Honestly, probably not too bad of an idea considering it's an interactive profiler that's already very expensive (traverses the whole reference graph, and generates a lot of objects internally). What we would lose on is the ability to figure out which frames objects has been lazy loaded and which have not, prior to running the profiler. At least this isn't a feature regression, since for Python < 3.11 they are always loaded. (Note to self: _PyFrame_GetFrameObject isn't exposed. Use PyThreadState_GetFrame)

Will do.

v3.1.3 released with support for Python 3.11

authors: frenck gothicVI maciejfic zhuyifei1999


text:
feat:add content about part1 to os dic

Description：

Related #36
[x] Add content about part1 to operating-system.
[x] Set click link to directory and make it jump conveniently.

LGTM.

repo: zhyChesterCheung/GoGetit


text:
--check-certificate not working ?

Hi,
Thanks for your WebUI, it's working great.
However, I've got one issue with it.
I try to download files from my main server in HTTPS, but with a self-signed certificate.
I changed the '--check-certificate=false' settings in the "Global Settings", but every time I try to download a link, aria2 write in the terminal :
05/19 13:36:45 [ERROR] CUID#46 - Download aborted. URI=https://ADDRESS/images/bg1.jpg
Exception: [AbstractCommand.cc:350] errorCode=1 URI=https://ADDRESS/images/bg1.jpg
-> [SocketCore.cc:933] errorCode=1 SSL/TLS handshake failure: Invalid certificate chain
I tried to inject the command into /js/ctrls/modal.js at line 69 : "settings['check-certificate'] = 'false';", the settings is sent, but this doesn't resolve the issue.
I did the same thing to inject a "http-user" and "http-passwd" settings and it work.
Have you the same issue on your side ?
A fix I found is to force "--check-certificate=false" when I launch the aria2 command in the terminal.
Thanks !

aria2 uses check-certificate option in config file or initial command-line options only.  If it is given in RPC method or -i list, it is ignored.

Oh, ok, my bad :smile: !
Thanks for your very fast answer !

authors: PanDoreS tatsuhiro-t


text:
Led Failed on usb dongle with cc2538

Hello
first of all sorry for my bad English :-(
I have update to 1.19.1-1 and all sensors works perfectly
before update, the normal behavior of our cc2538 dongle was red light always on and green light flashing during data traffic towards the sensors.
Now they are both always off.
Is there any option that we can use in the configuration to restore the normal behavior of the LEDs?
I have asked in a telegram group and this behavior is common for all so it is not only my problem.
wbr
Thank you
Tiziano

wrong github repository

hello
sorry
could you indicate to me the right one ?
thanks a lot
Tiziano


text:
How To Pathfind In Fcnpc

Can Anyone Help Me How TO Make A pathfinding Npc Like I had A Valet System It Always Comes From The Wall I Wanted To Make It As A pathFinder And Come From Road But Dont Goes Inside Buildings and Detect Walls, Any Help Will Be Appreciated.

#298

repo: ziggi/FCNPC


text:
the extension is asking nonstop for initial setup upon opening any .zig file

Had to disable the extension entirely

Did you complete the setup? You need to at least provide zig.path. Of course you could just set "zig.initialSetupDone": true but then the extension would complain about not having a path to zig.

Doesn't work; it gets removed upon closing VSCode.

Huh? What's up with that?

Is that the workspace specific settings.json? Putting it in the global one should work and I think I accidentally made it only update the workspace one.

Are you able to set other options or is it only this one specifically? Are you using some special untrusted mode?

whereas any that aren't (such as this flag)

But it is exposed same as all the others? Can you try reinstalling the extension?

I released 0.5.1 which makes the extension always use the global settings.json for this option. Please try to see if it fixes this for you.

For the record:
I was seeing this problem even with 0.5.1. Turns out I had "zig.initialSetupDone": true in my global settings, and "zig.initialSetupDone": false in my project settings. The extension was writing the former, but reading the latter, which reminds me of something.
I don't know the details here, but overall I am surprised that the extension needs to store state in the settings, leaking implementation details to user-directed interface. I would expect the extension to just try using Zig from the folder where zig is usually downloaded, and show the "download" message if it isn't there. If "file exists on the file system" is not enough persistent state, I would expect the extension to make use of globalState provided by VS Code.
If this might help, here's how we handled this in rust-analyzer extension, before we bundled the server with the extension itself:
https://github.com/rust-lang/rust-analyzer/blob/9f1a3ae5ab46132de350147753443be2ba87a756/editors/code/src/main.ts#L347-L388
Basically, the logic boils down to "use the binary if it is there, otherwise ask to download", with a twist: we want to update the binary when the VS Code extension is updated. For that, we use globalState to store the version of the extension that installed the server. globalState survives restarts, allowing newer version of the extension to pick up the server left by the previous one and replace it.

I did previously use globalState but I was unable to find an easy way to reset it so I changed it to an option.

Not sure it'll work in this context, but what we did was storing undefined as a value:
https://github.com/rust-lang/rust-analyzer/blob/2f6961aaaf65cff82e43ca9171fd7a824a7d81ca/editors/code/src/persistent_state.ts#L18

Wouldn't you still need a command or something to reset it without recompiling the extension?

authors: Vexu expikr matklad

repo: ziglang/vscode-zig


text:
Merge "frog_example.png" paintbucket example, along with gitignore file

This pull request will close #2 Instead of using painterro I used p5.js (pulling from a CDN)
The code is now able to:

Navigate to Paint page
Be able to paint areas of "frog_example.png"
Able to select: [Red, Green, Blue]
Have little to no merge conflicts with the newly added gitignore file created by asp.net

Please, don't remove the merged branch.

authors: RogerSmithR zikpefu

repo: zikpefu/paintbynumbers


text:
Improve description of object details

Description
Improve the description of the object details in the proto definition.
Acceptance criteria

[ ] a user reading the proto/swagger docs must understand which data the fields represent

@adlerhurst Can we close this issue since we are currently talking about our new api?

authors: adlerhurst hifabienne

repo: zitadel/zitadel


text:
[Bug]: post to /oauth/v2/revoke returns server error

Preflight Checklist

[X] I could not find a solution in the documentation, the existing issues or discussions
[X] I have joined the ZITADEL chat

Environment
ZITADEL Cloud
Version
No response
Describe the problem caused by this bug
Logs show that some requests on Aug 1 returned a 500 Error for put requests to /oauth/v2/revoke in the cloud service.
To reproduce
Check logs for Aug 1. Further analysis of what caused the issue needs to be done.

Screenshots
No response
Expected behavior
Server should respond with an error message and not catch-all 500 exception.
Operating System
No response
Relevant Configuration
No response
Additional Context
No response

Will close this issue, as it is not possible to find out what the problem is anymore.

authors: hifabienne mffap


text:
Error and Computation Time

Hi, while I am trying to run the google colab notebook,

I am getting the error:

"OSError: Can't load the configuration of '/mnt/peng/EasyEdit/hugging_cache/llama-2-7b'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure '/mnt/peng/EasyEdit/hugging_cache/llama-2-7b' is the correct path to a directory containing a config.json file"
Please advice what should be done.

Approximately how much time would this editing command take for execution?
python run_zsre_llama2.py
--editing_method=ROME
--hparams_dir=../hparams/ROME/llama-7b
--data_dir=./data

In my case it is stuck after displaying this line:
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████| 2/2 [00:13<00:00,  6.51s/it]

Problem 1: The default yaml configuration is an absolute path, which can be changed to the directory where you store the weights, such as ./hugging_cache/llama-2-7b, or directly use the online download method of meta-llama/ LLAMA-2-7B-HF.
Problem 2: Since the original dataset is about 1K pieces, the above script takes about 1-2h to run. If you only want to verify the validity of the method, you can set ds_size to 10 and edit only 10 samples.
See https://github.com/zjunlp/EasyEdit/blob/main/examples/run_zsre_llama2.py#L17

Thank you so much for your response.

@pengzju 请问假如我需要编辑llama2-7b模型，我需要从huggingface的llama2-7b仓库中下载哪些文件到./hugging_cache/llama-2-7b中呢？需要下载所有文件吗？谢谢！

正常来讲，您只需要下载蓝框内的文件。包括模型config，tokenizer config，模型权重等

感谢您的答复，谢谢！

Hello,
While trying to run python run_zsre_llama2.py
--editing_method=MEMIT
--hparams_dir=../hparams/MEMIT/llama-7b
--data_dir=./data
I am getting the error:
python3.9/site-packages/datasets/builder.py", line 539, in _create_builder_config
raise ValueError(
ValueError: BuilderConfig '20200501.en' not found. Available: ['20220301.aa', '20220301.ab', '20220301.ace', '20220301.ady', '20220301.af', '20220301.ak', '20220301.als', '20220301.am', '20220301.an', '20220301.ang', '20220301.ar', '20220301.arc', '20220301.arz', '20220301.as', '20220301.ast', '20220301.atj', '20220301.av', '20220301.ay', '20220301.az', '20220301.azb', '20220301.ba', '20220301.bar', '20220301.bat-smg', '20220301.bcl', '20220301.be', '20220301.be-x-old', '20220301.bg', '20220301.bh', '20220301.bi', '20220301.bjn', '20220301.bm', '20220301.bn', '20220301.bo', '20220301.bpy', '20220301.br', '20220301.bs', '20220301.bug', '20220301.bxr', '20220301.ca', '20220301.cbk-zam', '20220301.cdo', '20220301.ce', '20220301.ceb', '20220301.ch', '20220301.cho', '20220301.chr', '20220301.chy', '20220301.ckb', '20220301.co', '20220301.cr', '20220301.crh', '20220301.cs', '20220301.csb', '20220301.cu', '20220301.cv', '20220301.cy', '20220301.da', '20220301.de', '20220301.din', '20220301.diq', '20220301.dsb', '20220301.dty', '20220301.dv', '20220301.dz', '20220301.ee', '20220301.el', '20220301.eml', '20220301.en', '20220301.eo', '20220301.es', '20220301.et', '20220301.eu', '20220301.ext', '20220301.fa', '20220301.ff', '20220301.fi', '20220301.fiu-vro', '20220301.fj', '20220301.fo', '20220301.fr', '20220301.frp', '20220301.frr', '20220301.fur', '20220301.fy', '20220301.ga', '20220301.gag', '20220301.gan', '20220301.gd', '20220301.gl', '20220301.glk', '20220301.gn', '20220301.gom', '20220301.gor', '20220301.got', '20220301.gu', '20220301.gv', '20220301.ha', '20220301.hak', '20220301.haw', '20220301.he', '20220301.hi', '20220301.hif', '20220301.ho', '20220301.hr', '20220301.hsb', '20220301.ht', '20220301.hu', '20220301.hy', '20220301.ia', '20220301.id', '20220301.ie', '20220301.ig', '20220301.ii', '20220301.ik', '20220301.ilo', '20220301.inh', '20220301.io', '20220301.is', '20220301.it', '20220301.iu', '20220301.ja', '20220301.jam', '20220301.jbo', '20220301.jv', '20220301.ka', '20220301.kaa', '20220301.kab', '20220301.kbd', '20220301.kbp', '20220301.kg', '20220301.ki', '20220301.kj', '20220301.kk', '20220301.kl', '20220301.km', '20220301.kn', '20220301.ko', '20220301.koi', '20220301.krc', '20220301.ks', '20220301.ksh', '20220301.ku', '20220301.kv', '20220301.kw', '20220301.ky', '20220301.la', '20220301.lad', '20220301.lb', '20220301.lbe', '20220301.lez', '20220301.lfn', '20220301.lg', '20220301.li', '20220301.lij', '20220301.lmo', '20220301.ln', '20220301.lo', '20220301.lrc', '20220301.lt', '20220301.ltg', '20220301.lv', '20220301.mai', '20220301.map-bms', '20220301.mdf', '20220301.mg', '20220301.mh', '20220301.mhr', '20220301.mi', '20220301.min', '20220301.mk', '20220301.ml', '20220301.mn', '20220301.mr', '20220301.mrj', '20220301.ms', '20220301.mt', '20220301.mus', '20220301.mwl', '20220301.my', '20220301.myv', '20220301.mzn', '20220301.na', '20220301.nah', '20220301.nap', '20220301.nds', '20220301.nds-nl', '20220301.ne', '20220301.new', '20220301.ng', '20220301.nl', '20220301.nn', '20220301.no', '20220301.nov', '20220301.nrm', '20220301.nso', '20220301.nv', '20220301.ny', '20220301.oc', '20220301.olo', '20220301.om', '20220301.or', '20220301.os', '20220301.pa', '20220301.pag', '20220301.pam', '20220301.pap', '20220301.pcd', '20220301.pdc', '20220301.pfl', '20220301.pi', '20220301.pih', '20220301.pl', '20220301.pms', '20220301.pnb', '20220301.pnt', '20220301.ps', '20220301.pt', '20220301.qu', '20220301.rm', '20220301.rmy', '20220301.rn', '20220301.ro', '20220301.roa-rup', '20220301.roa-tara', '20220301.ru', '20220301.rue', '20220301.rw', '20220301.sa', '20220301.sah', '20220301.sat', '20220301.sc', '20220301.scn', '20220301.sco', '20220301.sd', '20220301.se', '20220301.sg', '20220301.sh', '20220301.si', '20220301.simple', '20220301.sk', '20220301.sl', '20220301.sm', '20220301.sn', '20220301.so', '20220301.sq', '20220301.sr', '20220301.srn', '20220301.ss', '20220301.st', '20220301.stq', '20220301.su', '20220301.sv', '20220301.sw', '20220301.szl', '20220301.ta', '20220301.tcy', '20220301.te', '20220301.tet', '20220301.tg', '20220301.th', '20220301.ti', '20220301.tk', '20220301.tl', '20220301.tn', '20220301.to', '20220301.tpi', '20220301.tr', '20220301.ts', '20220301.tt', '20220301.tum', '20220301.tw', '20220301.ty', '20220301.tyv', '20220301.udm', '20220301.ug', '20220301.uk', '20220301.ur', '20220301.uz', '20220301.ve', '20220301.vec', '20220301.vep', '20220301.vi', '20220301.vls', '20220301.vo', '20220301.wa', '20220301.war', '20220301.wo', '20220301.wuu', '20220301.xal', '20220301.xh', '20220301.xmf', '20220301.yi', '20220301.yo', '20220301.za', '20220301.zea', '20220301.zh', '20220301.zh-classical', '20220301.zh-min-nan', '20220301.zh-yue', '20220301.zu']
Please suggest what should be done.
Thank you!

Do you download the key status for layers [4, 5, 6, 7, 8] in llama2?
  examples
  ├── data
  │   ├── stats
  │   │   └── ._hugging_cache_llama-2-7b
  │   │       └── wikipedia_stats
  │   │           ├── model.layers.4.mlp.down_proj_float32_mom2_100000.npz
  │   │           ├── model.layers.5.mlp.down_proj_float32_mom2_100000.npz
  │   │           ├── model.layers.6.mlp.down_proj_float32_mom2_100000.npz
  │   │           ├── model.layers.7.mlp.down_proj_float32_mom2_100000.npz
  │   │           └── model.layers.8.mlp.down_proj_float32_mom2_100000.npz
  └── └── zsre_mend_eval_portability_gpt4.json

Yes done that!

Make sure that the directory for your load model in yaml is ./hugging_cache/llama-2-7b, you can refer to the code here.

I also recommend that you add a breakpoint here to see if filename exists. If it can route to filename, you do not need to download the wikipedia dataset, and your error will not occur.

If your problem has been resolved, please help close this issue.

Hi,
Yes, it has been resolved now. Thank you so much for the guidance and the quick response!

authors: DebapriyaHazra pengzju wending0417

repo: zjunlp/EasyEdit


text:
create MidRes.json isn't working

When I download FB15K-237 using Google Drive and run MidRes.json file, I get the following error. Please check..
I looked up the problem, but there is no difference between the entity2text.txt file uploaded to Google Drive and the entity2textlong.txt file.
run python ./LLM/create_midres.py
'''
Traceback (most recent call last):
File "./LLM/create_midres.py", line 39, in
build_midres()
File "./LLM/create_midres.py", line 28, in build_midres
for i in entity2textlong[lines[0]].replace('\n',' ').split('. '):
KeyError: '9447'
'''

Hi, sorry, the preprocessing code is missing and we will update these code ASAP.

Hi, the bug has been fixed and please try it again.

Thank you for your careful inspection and suggestions. The indentation has been modified now.
And please check your openai_key or the proxy if you use it in File "./LLM/gpt3kgc.py", line 15.

authors: Lim-YoungYoon Wangxh-07 zxlzr

repo: zjunlp/PromptKG


text:
Add miette-schema

See the top-level docstring for details

It looks like it's complaining about the derive(Default) on the enum?

Also yeah idk what is going on with those Miri errors

...ok I can't reproduce this failure at all:
Genuinely nothing I touched should affect this at all..?
Couldn't compile the test.
---- src/eyreish/macros.rs - eyreish::macros::ensure (line 85) stdout ----
error: unexpected token
  --> src/eyreish/macros.rs:98:2
   |
15 | }, 1).1,
   |  ^

error[E0599]: the method `miette_kind` exists for reference `&ScienceError`, but its trait bounds were not satisfied
  --> src/eyreish/macros.rs:104:1
   |
9  | enum ScienceError {
   | -----------------
   | |
   | doesn't satisfy `ScienceError: Into<ErrReport>`
   | doesn't satisfy `ScienceError: miette::eyreish::kind::TraitKind`
   | doesn't satisfy `ScienceError: std::fmt::Display`
...
21 | ensure!(depth <= MAX_DEPTH, ScienceError::RecursionLimitExceeded);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&ScienceError` due to unsatisfied trait bounds
   |
   = note: the following trait bounds were not satisfied:
           `ScienceError: Into<ErrReport>`
           which is required by `ScienceError: miette::eyreish::kind::TraitKind`
           `ScienceError: std::fmt::Display`
           which is required by `&ScienceError: miette::eyreish::kind::AdhocKind`
           `&ScienceError: Into<ErrReport>`
           which is required by `&ScienceError: miette::eyreish::kind::TraitKind`
note: the traits `Into` and `std::fmt::Display` must be implemented
  --> /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/convert/mod.rs:447:1
  --> /rustc/9eb3afe9ebe9c7d2b84b71002d44f4a0edac95e0/library/core/src/fmt/mod.rs:767:1
   = note: this error originates in the macro `$crate::miette` which comes from the expansion of the macro `ensure` (in Nightly builds, run with -Z macro-backtrace for more info)

btw i wouldn't land this until i've had a chance to test it out in axoproject and see if it makes any sense in practice -- which will probably be in a week or so with my current yak-shave stack

@Gankra I'll move it to Draft until then, in that case. Feel free to un-draft it once you feel more confident in it.

@Gankra Hi! Recently I've added some basic support for serde in miette. Your idea with miette-schema sounds very interesting to me and may fall to my use case! Do you plan to continue working on it?

authors: Gankra gavrilikhin-d zkat

repo: zkat/miette


text:
Script to update DKIM registry

Create a script to update tokens not in DKIM registry based on the default uniswap list -  https://github.com/Uniswap/default-token-list/tree/main/src/tokens

Moved this to email-wallet as TokenRegistry is there - https://github.com/zkemail/email-wallet/issues/7

repo: zkemail/zk-email-verify


text:
Add support for TLSA

Is it possible to add support to send TLSA queries (RFC 6698, https://tools.ietf.org/html/rfc6698)?
It could be great to discover the MX record for a bunch of domains and then follow up if there are TLSA records configured for them for a list of known ports.

We'd be happy to accept a pull request that adds support for TLSA queries.

PR: #161 adds support for TLSA and SRV.

authors: kesara seb-at-nzrs zakird

repo: zmap/zdns


text:
ch.12: missing line in code snippet, pg. 394

Missing: typedef struct _FLT_IO_PARAMETER_BLOCK {

Good catch :)

While at it, can fix also the a minor typo in the following section, same page:

2nd one fixed now, but the struct declaration is still in-correct?

authors: profnandaa zodiacon


text:
Schools Modules + Parent Dashboard

Description

Move the Parent Dashboard, for those who belong to a school network, up higher on the Dashboard
Add a module on the Dashboard that take you to an info page for the School Networks. (UK Only)

@selvach I left cohort stuff in there intentionally
https://analytics.amplitude.com/covidradar/dashboard/rfoazt2

repo: zoe/covid-tracker-react-native


text:
rust-nightly 编译出来的无法连接

[ERROR] Unexpected EOF while reading initialize vector
提示这个错误，用其它客户端正常
另外，貌似选了 -u 参数后会 core dump
再另外，貌似不支持 localhost 这样的本地地址，或者 ::1 这样的 ipv6 地址，还有服务器也不支持域名

Unexpected EOF while reading initialize vector, 这个是服务器端断开了链接。
-u 参数很久没有用过了，之后我会修一下它。
服务器支持域名，我自己就在用。
支持 localhost 或 ::1 是什么意思？是说 client 端 listen 的地址？

就是 -b 参数指定的地址，写 127.0.0.1 是没有问题的，而 localhost 或者 ::1 是不行的，但这两个也是合法的本地地址 :-)

我刚又重新确认了一下， libev 的服务器会有这个问题，所以暂时不知道是哪里原因，服务器域名这个确实支持

我之前测试 libev 后端的时候也遇到过这个问题，主要是 libev 版本的服务器处理网络包的方式不对。一个简单的 fix 是修改 https://github.com/zonyitoo/shadowsocks-rust/blob/master/src/relay/tcprelay/local.rs#L177
这里面由于是先把 IV 发过去，再发接下来的第一个包，而 shadowsocks 的大多数实现，包括 Python 版本的实现，都会把 IV 与后面的第一个包连在一起同时发。Python 的 Server 端可以正确处理这种情况，而  libev 版本不能。

至于说 -b 参数不支持 localhost ，这个没有考虑到。不过不支持 ::1 确实有点奇怪，算是Bug。
Ref: https://github.com/zonyitoo/shadowsocks-rust/blob/master/src/bin/local.rs#L164

使用 ::1 没有任何问题，猜测是因为你的客户端没有配置为使用 ::1 的地址。不准备支持 localhost，感觉没什么必要。若想要同时支持 127.0.0.1 和 ::1，建议使用 0.0.0.0 或 ::。

@sbwtw Ping. Are there any specific problem that haven't been solved yet? If it is not, I will close this issue.

authors: sbwtw zonyitoo

repo: zonyitoo/shadowsocks-rust


text:
Documentation on enabling and disabling Zowe components is confusing

Putting aside that it's interesting that we have a page https://docs.zowe.org/stable/user-guide/api-mediation/configuration-api-mediation-standalone all about enabling only one part of Zowe, and no such pages for the other parts of Zowe, if my goal were to enable only APIML, I don't think this page has enough info to accomplish the task.
The page just says "Find or add the property components.*.enabled and set this property to false for all components that should not be started."
It doesnt really tell you what components those would be.
Then, on the page right under it on the sidebar, pretty much the same thing is said in a different way.

What if we had just one page on the subject, and not APIML specific, but rather one that details all the parts of zowe, categorized, and explains how to enable just what you need?
Limiting started Zowe services
Zowe's server installation contains groups of components that are useful to run together, but often you do not need to enable all parts of Zowe.
You can save system resources by disabling the parts of Zowe that you do not use.
Below is a list of the components of Zowe, their purpose, and their name within the Zowe YAML file.
To enable or disable each component, simply edit components.<component-name>.enabled to true or false in the YAML.
You must restart Zowe for the changes to take effect.

Category
Component
Purpose

API Mediation Layer
api-catalog
Used to view API swagger / openAPI specifications for registered API services of the API Mediation Layer.

API Mediation Layer
discovery
This server is used to register API services and track the health of them for use in the API Mediation Layer.

API Mediation Layer
gateway
The gateway unifies all the services of Zowe under one proxied server for improved security, management, and high availability.

API Mediation Layer
caching-service
The caching service is used to share state between different Zowe instances in a high availability topology.

API Mediation Layer
zaas
ZAAS provides authentication services used by the API Mediation Layer.

App Framework
app-server
The App server powers the Zowe Desktop accessible via web browsers.

App Framework
zss
Z Secure Services (ZSS) provides REST API services for file, dataset, and other z/OS content. Its APIs are used by apps in the Desktop, such as the the File Editor.

Given how the API ML page looks like, it seems like some kind of strange relict. We probably should remove it.
As for the enabling and disabling of the actual components. I would much rather have API Mediation Layer as one component from the point of view of enabling and disabling at least for V4.

repo: zowe/docs-site


text:
How to handle End of Support for Node.js V6

Node V6 for z/OS is at "end of marketing" from IBM which means new copies of the code are no longer available. Customers are encouraged to move to Node V8 or V12. The Zowe system requirements document V6 or above as pre-req. How best to handle the phase out of V6.

Give notice to Zowe consumers via doc and or code messages?
Phase out of testing by CI/CD team
Official end of support from IBM is Sept 2020. (The Node community has already dropped V6 and V8 support.) https://nodejs.org/en/about/releases/

Sean/Peter - My understanding is there are no know issues with V6 today and the question is what - if anything - the community should do or say as we know V6 will go out of support in Sept ....although customers are free to run unsupported if they choose.  I would like to discuss the following

Introduce a warning message in the Zowe install scripts if V6 found - when to do this is up for debate (I would think at least 30 days prior to end of support). Knowing the pace of some enterprises software updates I would lobby for more days of warning
If (I stress if) you think it is worth stating something if a problem is found unique to V6 it will be addressed in V8 or V12. I think you said you did not want to code something specific to V6 at this stage of its life. The SMP/E format has a statement in Program Director that says V6 or higher. Zowe doc System Requirements also say V6 or higher
https://docs.zowe.org/stable/user-guide/systemrequirements.html#common-z-os-system-requirements-host

Or we say nothing - close this issue and take action once V6 is truly out of support.

Printing a warning sounds like a good idea. Due to current events, warning in advance is good.
But, I don't know what the warning will say. I see 3 options:
1 Warning, in september node 6 will not be supported by anyone, and therefore zowe's own support of it is best-effort.
2 ... and therefore zowe will not be accepting v6-specific bug fix requests
3 ... and therefore zowe will stop working with v6 soon after
How strong of a stance do we take? 3 gives us more freedom but isn't needed at this time. I think 2 is best.

Issue https://github.com/zowe/zowe-install-packaging/issues/1410 exists to put a warning into the validate.sh script of Zowe that is used at startup to validate node.  This is option (2) that I agree with Sean is the approach we should take.  I don't want Zowe to stop working if a customer has node 6 - that would be punitive and I don't see what purpose it serves other than to drive traffic away from Zowe, but customers should be aware that they are working unsupported

Doing a google of node support I find this https://developer.ibm.com/mainframe/2019/04/26/node-js-zos-v6-17/ that states:
As announced, the Node.js version 6 community release will hit end of life on 30 April 2019.
IBM will continue to support paying clients of IBM SDK for Node.js – z/OS (based off of the
Node.js V6 community release) past 30 April 2019

@armstro - where are the list of published dates for node ?  Is there a site that Roland and his team maintain ?

@Joe-Winchester to answer the EOS question see here: https://www.ibm.com/support/lifecycle/index.html#/details?q45=R736925B47749P13 Sept 30 2020
Since we have warning messages in App framework and start up scripts for Zowe for Node V6 going EOS I will close this issue.

repo: zowe/zlc


text:
Two stage-parsing

Would it be possible to add a function that does an (optional) parsing which returns the required number of tokens for a given JSON string?
The rest could work as it does now. This way it would be possible to handle input of a previously unspecified length and keep all the benefits of the current library.

Bitbucket: https://bitbucket.org/zserge/jsmn/issue/10
Originally reported by: Anonymous
Originally created at: 2012-12-06T12:35:46.387

It can actually be modified with very few changes.
I've attached a sample of how it could be done: jsmn with count

Original comment by: illishar

This is actually a major issue.
The way it is now, you have to guess at your required number of tokens. Each token takes up 16-20 bytes of memory. The recommended size (used by the samples) token array is 256. Means 5120 bytes of ram. (You shouldn't stack allocate that much btw.) And 256 tokens might not be enough or it might be way too much.
Many ansi c functions returns the required "number". That way you can call the function with a NULL allocation and allocate the required number afterwards. (Eg. snprintf comes to mind.)
The issue is actually too much for me to overcome, I'm afraid. I'll have to search for something else.

Original comment by: illishar

repo: zserge/jsmn


text:
Add ignore rules

Add basic ignore rules to zucks adapter project.

@h-minamiohtsu Please review this 🙏


text:
Improve unread screen. Fix: #2865 & #2866.

unreadScreen: Sort pinned & non pinned streams internally. b5fed4a
Now both the sections (pinned and non-pinned) streams are sorted
internally in alphabetically order.
Fix: #2865

unreadScreen: Show a swparator b/w pinned and non pinned streams. e916ffd
Fix: #2866.

Hi @jainkuniya !
This seems like a good UI change.
In the second commit, we start separating the array into two arrays for isPinned and !isPinned entries respectively.
Given that we're doing that, it seems like there's not much point in sorting the original array by isPinned. :slightly_smiling_face: Am I missing another place where it makes a difference?
If indeed it doesn't make a difference, let's just delete the sorting part.

authors: gnprice jainkuniya

repo: zulip/zulip-mobile


text:
enhancement: Reduce image size in user popups.

This not a final decision yet, so before working on this, you'll want to get consensus.
The user popup menu features a large image of the person, which makes it kind of large for what's essentially a context menu.
We may want to use a design like this, at least at smaller resolutions, and possibly always:

@zulipbot claim

@vinitS101 Some tips for you if this design gets approved. The design was basically 2-3 design patch while I was doing experimentation. Some changes in user_info_popover_content.handlebars and some in .scss file. Also see render_user_info_popover() function . But this is just a rough estimate

Yeah, I was just adding the css to style tags in the user_info_popover_content.handlebars file for testing. Basically just centering the image, proper padding between the divs, etc. I can move them over to the scss files when making the final changes.

@zulipbot abandon

We open the user popup when clicking on a profile picture, so we definitely want to display a larger version of the profile picture in the user popover. This is also the way Slack, Mattermost and RocketChat do it. Our current user popup fits fine on mobile screens and since I don't think there is anything to be gained from reducing the image size, I'm closing this.

authors: Gittenburg showell thedeveloperr vinitS101

repo: zulip/zulip


text:
Mentioning somebody while editing a message doesn't show suggesting menu

I edited a message to mention one of my colleagues. The list with suggested users doesn't show up after typing a @ and the first letter. It works in the compose text area for new messages.

There's a tricky UX issue that we'll need to think about, which is what should the system do if you edit an old message to @-mention someone -- does it deliver them a new notification about a message that could be months old ?
Currently our solution to this is we don't supporting adding @-mentions to existing messages for this reason, which is why there's no autocomplete for mentions in the edit box (while there is for e.g. emoji).
The solution right now if you want to get someone's attention on a message you've already sent is to send a new message @-mentioning them and referring them to your previous message.
I'm open to supporting adding @-mentions when editing if someone has a good solution to the UX issues here.

Is the tricky part that you could double notify users that were already mentioned before? Do I get this right? Or is the issue only that the notification is about a old message?

No we can easily check if the person was already mentioned so that's not an issue -- it's just the issue with notifications about an old message.  If someone wanted to change this, I think it wouldn't be too hard to trigger a notification that's a bit different from the normal "new message" ones for the case of "someone edited a past message to @-mention you"

Ah, I see... Thanks for clearing up.

We've now changed message editing so that, in many realms, the window for editing an old message is only a few minutes long. In cases where the edit is necessarily within only a few minutes of the original message by dint of that short editing window, I'd love to be able to more easily @-mention a colleague while editing my original message.
I like the idea of the notification saying "[user] edited [this message], originally posted/last edited [timestamp/date], to mention you".

This would be great for someone to take up. Ping us on chat.zulip.org before starting, to nail down the exact behavior desired.

Some quick notes on how this should work:
The backend can check whether the user in question has read the message yet in do_update_message.  If they haven't, it can just update the message and proceed happily.  If the user has already read the message, then we need to notify the user, maybe with a "you have a new mention" email / desktop notification (depending on the user's configuration).

authors: brainwane pkaske rishig timabbott


text:
LaTeX for languages that doesn't use space to separate words.

The Chinese language does not separate words with a space (and so is Korean, Japanese etc, but I'm not sure how their standard of interacting with math).
So for my students, it is perfectly reasonable to write things like
 假设$$x=5$$，
and unfortunately in Zulip, this does not get turned into LaTeX. But it would be, if spaces are added around it.
This is a major pain for my students who try to communicate in Zulip with Chinese, sends a message, and realize they have to add the spacing, and edit. It causes a huge amount of friction.

CZO discussion

After carefully reviewing  the discussions and gaining a thorough understanding of the challenges discussed, I can  provide a concise summary of the main problem addressed and the proposed solutions outlined in the conversation
Main Problem Discussed:

Technical barriers and conflicts with CommonMark when using standard LaTeX delimiters for display math in Zulip.
Preference among users for the inline math approach with single dollar signs due to compatibility and familiarity.

Proposed Solutions:

Develop a CommonMark-compatible parsing algorithm for seamless LaTeX rendering.
Emphasize the use of inline math with single dollar signs to reduce conflicts and improve user experience.
Implement postprocessing techniques for accurate rendering of LaTeX expressions.
Update documentation and provide user education to guide users in effectively using LaTeX in Zulip messages.

Returning to the issue raised by [@chaoxu ], following thorough investigation, I can  present the following insights and proposed solutions.
Issue Summary:
The issue arises from the fact that languages like Chinese, Korean, and Japanese do not separate words with spaces, causing inconvenience when using LaTeX delimiters without spaces in Zulip. This leads to friction and editing efforts for users trying to communicate math expressions in non-spaced languages.
Solution Proposed:
Enhanced Parsing Algorithm

Develop an enhanced parsing algorithm in Zulip's markdown processor to recognize and render LaTeX expressions seamlessly, including support for inline math with single dollar signs, without requiring additional spacing.
Utilize libraries such as markdown-it with custom plugins or extensions to handle LaTeX formatting more effectively, taking into account language-specific conventions.
Language-Specific Parsing Rules:
Implement language-specific parsing rules or heuristics for languages like Chinese, Korean, and Japanese, where mathematical expressions may not follow typical spacing conventions.
Utilize natural language processing (NLP) techniques to identify and handle mathematical expressions within text without the need for additional spacing, especially for languages like Chinese.
User Education and Documentation:
Enhance user education and documentation within Zulip to guide users, especially non-English speakers like Chinese professors, on effectively using LaTeX formatting without encountering issues related to language-specific spacing.
Provide clear instructions and examples on how to format mathematical expressions seamlessly in languages with unique spacing conventions.

Technical Steps :
1.	Library Integration and Algorithm Development:

Integrate the markdown-it library with custom plugins or extensions to support enhanced parsing of LaTeX expressions, focusing on seamless conversion without requiring additional spacing.
Develop an algorithm within Zulip's markdown processor to handle LaTeX expressions seamlessly, including support for inline math with single dollar signs, specifically addressing the issue faced .

2.	Language-Specific Parsing Rules:

Implement language-specific parsing rules or heuristics for Chinese, Korean, and Japanese languages to handle mathematical expressions without the need for additional spacing, utilizing NLP techniques for accurate detection.

3.	Documentation Enhancement:

Update Zulip's documentation and formatting help to provide comprehensive guidance on LaTeX formatting, including examples and best practices specifically tailored to users communicating in languages with unique spacing conventions like Chinese.

Enhancing LaTeX support and related features in Zulip is important, especially considering the significant number of researchers and academic professionals who rely on Zulip for communication and collaboration. By prioritizing and improving these features, we can significantly enhance the user experience for this important target audience, enabling them to use the app more effectively and efficiently for their academic endeavors

authors: ArfaNada alya chaoxu


text:
Unclear how to create a private stream

I wanted to create a private stream, and found this UI:

It's not at all obvious that the "Create new stream" button leads to an additional dialog box that allows making the stream private:

I was hesitant to click the button for fear of creating a public stream instead.  I ended up hunting unsuccessfully for the UI to create private streams, and ultimately had to ask another user to point me in the right direction.

Yeah.  I think in general that page could use an overhaul.

I suppose even the name of the stream should be asked in the dialog box only.What say @timabbott ?

Yeah, I think that (and just removing the text box on the main page) would be a good incremental improvement here.
@wdaher what do you think?

So, @timabbott do you think if I should take this as my first project?

Yeah seems like a great starter project!

Now that I was going through the code, Just moving stream name inside the dialog box isn't a very good idea, as it searches if the user has already subscribed or not to the stream but having filling all the options and than getting the error you are already subscribed would not be a very good idea, What do you think?

It's probably a pretty rare case that someone will try to create a stream
that they're already subscribed to, so I think it's fine to give an error
in that case.

Ah, okay. Working on it. :)

@timabbott I've opened a PR #514 , Please review it and tell if any further changes are required.

authors: bgilbert disissid timabbott