23 Star 195 Fork 28

gfdgd xi/uengine 运行器

 / 详情

应用商店“更换源”逻辑有误

已完成
成员
创建于  
2023-01-23 18:25

更换到不可用的源之后虽然已经提示,但实际还是切换到了那个不可用的源。所以下载应用时会出现“无法获取配置文件”。
输入图片说明
复现方法:

  1. 打开内置微型应用商店。
  2. 点击“切换源-本地测试源(或其他任意一个不可用的源)”。这时弹出“无法连接到服务器”。点击确定。
  3. 点击任意一款应用,安装。

我看看我能不能解决 :stuck_out_tongue:

评论 (1)

Bail 创建了任务
Bail 添加了
 
bug
标签
Bail 添加协作者Bail
gfdgd xi 任务状态待办的 修改为进行中
Bail 通过gfdgd-xi/uengine-runner Pull Request !7任务状态进行中 修改为已完成
Bail 计划截止日期设置为2023-01-24
Bail 任务状态已完成 修改为待办的
展开全部操作日志

这个问题还是没完全修
现存问题:

  1. 切换到不可用的源后提示无法连接到服务器,再点开“切换源”后显示为gitlink源
    控制台输出(以gitee源为例):
    Traceback (most recent call last):
      File "./AutoConfig.py", line 536, in ChangeSources
        lists = json.loads(requests.get(f"{urlSources}/list.json").text)
      File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
    
  2. 执行上述操作后,再切换到github源,然后再切换到一个不可用的源,直接报错退出。
    控制台输出(以gitee源为例):
    Traceback (most recent call last):
      File "./AutoConfig.py", line 536, in ChangeSources
        lists = json.loads(requests.get(f"{urlSources}/list.json").text)
      File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "./AutoConfig.py", line 544, in ChangeSources
        [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
    TypeError: list indices must be integers or slices, not list
    已放弃
    

完整控制台输出:

/usr/bin/deepin-terminal
太常引·建康中秋夜为吕叔潜赋
一轮秋影转金波,飞镜又重磨。把酒问姮娥:被白发、欺人奈何?
乘风好去,长空万里,直下看山河。斫去桂婆娑,人道是、清光更多。

译文:一轮缓缓移动的秋月洒下万里金波,就像那刚磨亮的铜镜又飞上了天廓。我举起酒杯问那月中的嫦娥:怎么办呢?白发日增,好像故意欺负我。
我要乘风飞上万里长空,俯视祖国的大好山河。还要砍去月中摇曳的桂树枝柯,人们说,这将使月亮洒下人间的光辉更多。
================================
Traceback (most recent call last):
  File "./AutoConfig.py", line 536, in ChangeSources
    lists = json.loads(requests.get(f"{urlSources}/list.json").text)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)
Traceback (most recent call last):
  File "./AutoConfig.py", line 536, in ChangeSources
    lists = json.loads(requests.get(f"{urlSources}/list.json").text)
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 2 (char 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./AutoConfig.py", line 544, in ChangeSources
    [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action][urlSourcesIndex].setChecked(True)
TypeError: list indices must be integers or slices, not list
已放弃

(测试环境不用说了吧)

Bail 置顶等级设置为
gfdgd xi 任务状态待办的 修改为已完成
gfdgd xi 置顶等级 修改为不置顶

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
12130568 bailplus 1689858691
Python
1
https://gitee.com/gfdgd-xi/uengine-runner.git
git@gitee.com:gfdgd-xi/uengine-runner.git
gfdgd-xi
uengine-runner
uengine 运行器

搜索帮助

Cb406eda 1850385 E526c682 1850385