python中的ID生成应用程序

时间:2019-01-23 11:55:14

标签: python-2.7

我正在制作一个生成ID卡的GUI。这是我的代码:

public void shouldUpdateClaimGroupingKeyForDealerUpdate() throws Exception {    
         Dealer dealer = make(a(DealerMaker.Dealer));
         ClaimGroupingHistory claimGroupingHistory = make(a(ClaimGroupingHistoryMaker.ClaimGroupingHistory));

         String userId = "/user/0001";
         Status draft = make(a(Draft));
         User user = make(a(UserMaker.User, with(UserMaker.id, userId),with(UserMaker.email, "user@example.com"))).toUser();
            ArrayList<ClaimGroupingKeyMapping> mapping = new ArrayList<ClaimGroupingKeyMapping>();
            ClaimGroupingKeyMapping e = new ClaimGroupingKeyMapping();
            GroupingKeys groupingKeys= new GroupingKeys();
            groupingKeys.setValue(1l);
            groupingKeys.setCode("code");
            e.setValue(1l);
            e.setGroupingKeys(groupingKeys);
            mapping.add(e); 
        ArrayList<GroupingKeys> grpKey = new ArrayList<GroupingKeys>();
        grpKey.add(new GroupingKeys());
        GroupingKeyResource groupingKeyResource = new GroupingKeyResource();
        groupingKeyResource.setGroupingKeys(grpKey);

        ArrayList<ClaimGroupingHistory> historyLog=new ArrayList<ClaimGroupingHistory>();
        List<String> groupName=new ArrayList<String>();

        when(claimGroupingHistoryRepository.getClaimGroupingHistory(dealer.getDealerId())).thenReturn(historyLog);
        when(claimGroupingHistoryRepository.getGroupingKeyName(groupingKeys.getId())).thenReturn(groupName);

        service.updateClaimGroupingKeyForDealer(dealer.getDealerId(), groupingKeyResource, userId);

    } 

我遇到了这个问题:

  

文件“ /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py”,第1536行,位于__call__       返回self.func(* args)     生成中的文件“ / Users / ChipwireTech01 / Desktop / Python工作区/Tests/Sample.py”,第58行       image.save(name +'。png')     保存文件“ /Users/ChipwireTech01/Library/Python/2.7/lib/python/site-packages/PIL/Image.py”,行1976       引发ValueError('未知文件扩展名:{}'。format(ext))   ValueError:未知文件扩展名:

如果有关系,我使用Mac。

0 个答案:

没有答案