Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » SB3 to SB2 Converter (working)
- abc_tp
-
3 posts
SB3 to SB2 Converter (working)
I get the following error when trying to convert
Traceback (most recent call last):
File “C:\installables\sb3tosb2-master\sb3tosb2-master\sb3tosb2.py”, line 2856, in <module>
result = ProjectConverter().convertProject(sb3path, sb2path, gui=gui, replace=gui, compatibility=(c or j or l), unlimitedJoin=j, limitedLists=l, penFillScreen=p)
File “C:\installables\sb3tosb2-master\sb3tosb2-master\sb3tosb2.py”, line 2730, in convertProject
sprite = self.convertTarget(target, targetsDone, maxLen)
File “C:\installables\sb3tosb2-master\sb3tosb2-master\sb3tosb2.py”, line 1728, in convertTarget
self.addCostume©
File “C:\installables\sb3tosb2-master\sb3tosb2-master\sb3tosb2.py”, line 1481, in addCostume
md5ext = c
KeyError: ‘md5ext’
How to resolve
I have the same problem!
The problem is caused by, in some case, there is no “md5ext” key. This key contain the file name of the Costume!
File name of the Costume, can also get from these 2 keys: ‘assetId’, ‘dataFormat’!
I just do the following, then solve the problem:
In function 【def addCostume(self, c):】
1. replace the code line 【md5ext = c['md5ext']】with【md5ext = c['assetId']+'.'+c['dataFormat']】
2. replace the code line 【f = self.zfsb3.open(c['md5ext'], ‘r’)】with【f = self.zfsb3.open(c['assetId']+'.'+c['dataFormat'], ‘r’)】
Sorry that, I don't know, how to show “Open bracket”, “Closed bracket” here.
So, I just replace “Open bracket”, “Closed bracket”, with it's Chinese counterparts “[”, “]”!
Dude then the python file doesnt even open.
Do you have replace Chinese character “[”, “]”, with it's English counterparts, “Open bracket”, “Close bracket”?
Also note that, Python program is sensitive to Indention!
Today, I go to sb3tosb2 official site (https://github.com/RexScratch/sb3tosb2). I find that, sb3tosb2 has been modified to reflect “md5ext” issue.
So, you just go there, download new version, and try it!
Last edited by abc_tp (Sept. 16, 2019 00:29:57)
- dbdb44
-
3 posts
SB3 to SB2 Converter (working)
Thank you so much, I was able to save a project I had been working on for weeks!! 

- Finn123Corp_Inc
-
55 posts
SB3 to SB2 Converter (working)
i use it too!!!!! 1. I'm using Python Idle 3.7.2
2. I did let it fully load. The X,Y coordinates were moving (when my mouse moved) and only a default project displayed for over a half an hour.
3. I have now tried with multiple projects to get the same result of a blank project file.
- HeyoGame
-
1 post
SB3 to SB2 Converter (working)
How do i create a new sb2 file for my sb3 project?
- lucasherogaming
-
8 posts
SB3 to SB2 Converter (working)
define how do u convert sb3 to sb2?
ask [how can I convert my project to sb2?
Last edited by lucasherogaming (Sept. 21, 2019 22:49:45)
- lucasherogaming
-
8 posts
SB3 to SB2 Converter (working)
I really want to be able to
Last edited by lucasherogaming (Sept. 21, 2019 22:50:18)
- Inproject
-
3 posts
SB3 to SB2 Converter (working)
How do I open? It does not have any responses when I open my sb3 file with the python file you posted.
when green flag clicked<<need help> and <anyone can help me?>>
- samuelronban
-
3 posts
SB3 to SB2 Converter (working)
Where is the .SB2 project saved?
Edit: I found the solution.
Edit: I found the solution.
Last edited by samuelronban (Oct. 10, 2019 16:26:38)
- DABOSS2016YT
-
1 post
SB3 to SB2 Converter (working)
My sound is a little messed up, it won't show after the conversion, any help?
- CollabsBlendytato
-
3 posts
SB3 to SB2 Converter (working)
This might be a necropost but I need help:
When I try to convert sb3 to sb2 this error appears:
Traceback (most recent call last):
File “sb3tosb2.py”, line 2709, in convertProject
self.zfsb2 = zipfile.ZipFile(sb2path, ‘x’)
File “/usr/lib/python3.4/zipfile.py”, line 902, in __init__
raise RuntimeError('ZipFile() requires mode “r”, “w”, or “a”')
RuntimeError: ZipFile() requires mode “r”, “w”, or “a”
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “sb3tosb2.py”, line 2882, in <module>
result = ProjectConverter().convertProject(sb3path, sb2path, gui=gui, replace=gui, compatibility
c or j or l), unlimitedJoin=j, limitedLists=l, penFillScreen=p)
File “sb3tosb2.py”, line 2722, in convertProject
self.zfsb2 = zipfile.ZipFile(sb2path, ‘x’)
File “/usr/lib/python3.4/zipfile.py”, line 902, in __init__
raise RuntimeError('ZipFile() requires mode “r”, “w”, or “a”')
RuntimeError: ZipFile() requires mode “r”, “w”, or “a”
Anyone knows a solution?
When I try to convert sb3 to sb2 this error appears:
Traceback (most recent call last):
File “sb3tosb2.py”, line 2709, in convertProject
self.zfsb2 = zipfile.ZipFile(sb2path, ‘x’)
File “/usr/lib/python3.4/zipfile.py”, line 902, in __init__
raise RuntimeError('ZipFile() requires mode “r”, “w”, or “a”')
RuntimeError: ZipFile() requires mode “r”, “w”, or “a”
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “sb3tosb2.py”, line 2882, in <module>
result = ProjectConverter().convertProject(sb3path, sb2path, gui=gui, replace=gui, compatibility

File “sb3tosb2.py”, line 2722, in convertProject
self.zfsb2 = zipfile.ZipFile(sb2path, ‘x’)
File “/usr/lib/python3.4/zipfile.py”, line 902, in __init__
raise RuntimeError('ZipFile() requires mode “r”, “w”, or “a”')
RuntimeError: ZipFile() requires mode “r”, “w”, or “a”
Anyone knows a solution?
- CollabsBlendytato
-
3 posts
SB3 to SB2 Converter (working)
Srry for doubleposting
Last edited by CollabsBlendytato (Oct. 16, 2019 20:40:05)
- scratchquasipro
-
8 posts
SB3 to SB2 Converter (working)
sa maide pas
Last edited by scratchquasipro (Nov. 17, 2019 19:16:05)
- -Rex-
-
500+ posts
SB3 to SB2 Converter (working)
Your Python version is outdated. Try using Python 3.6 or later. This might be a necropost but I need help:
When I try to convert sb3 to sb2 this error appears:
Traceback (most recent call last):
File “sb3tosb2.py”, line 2709, in convertProject
self.zfsb2 = zipfile.ZipFile(sb2path, ‘x’)
File “/usr/lib/python3.4/zipfile.py”, line 902, in __init__
raise RuntimeError('ZipFile() requires mode “r”, “w”, or “a”')
RuntimeError: ZipFile() requires mode “r”, “w”, or “a”
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “sb3tosb2.py”, line 2882, in <module>
result = ProjectConverter().convertProject(sb3path, sb2path, gui=gui, replace=gui, compatibilityc or j or l), unlimitedJoin=j, limitedLists=l, penFillScreen=p)
File “sb3tosb2.py”, line 2722, in convertProject
self.zfsb2 = zipfile.ZipFile(sb2path, ‘x’)
File “/usr/lib/python3.4/zipfile.py”, line 902, in __init__
raise RuntimeError('ZipFile() requires mode “r”, “w”, or “a”')
RuntimeError: ZipFile() requires mode “r”, “w”, or “a”
Anyone knows a solution?
- IronHead43
-
53 posts
SB3 to SB2 Converter (working)
i clicked clone or download then opened the file and opened the python file then it just opened python editor. I clicked run and nothing happened it just seemed like some kind of shell?