Discuss Scratch

abc_tp
Scratcher
3 posts

SB3 to SB2 Converter (working)

OXApps wrote:

abc_tp wrote:

IkatSethi wrote:

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
Scratcher
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
Scratcher
55 posts

SB3 to SB2 Converter (working)

321RetroGamer wrote:

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.
i use it too!!!!!
HeyoGame
Scratcher
1 post

SB3 to SB2 Converter (working)

How do i create a new sb2 file for my sb3 project?
gamer__--12321
Scratcher
6 posts

SB3 to SB2 Converter (working)

turn cw () degrees
lucasherogaming
Scratcher
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
Scratcher
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
Scratcher
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?>>
Inproject
Scratcher
3 posts

SB3 to SB2 Converter (working)

I need a lot of help!
samuelronban
Scratcher
3 posts

SB3 to SB2 Converter (working)

Where is the .SB2 project saved?
Edit: I found the solution.

Last edited by samuelronban (Oct. 10, 2019 16:26:38)

DABOSS2016YT
Scratcher
1 post

SB3 to SB2 Converter (working)

My sound is a little messed up, it won't show after the conversion, any help?
luckylawrence68
Scratcher
2 posts

SB3 to SB2 Converter (working)

if <> then
move (b) steps
end
kek
CollabsBlendytato
New Scratcher
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, 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?
CollabsBlendytato
New Scratcher
3 posts

SB3 to SB2 Converter (working)

Srry for doubleposting

Last edited by CollabsBlendytato (Oct. 16, 2019 20:40:05)

scratchquasipro
Scratcher
8 posts

SB3 to SB2 Converter (working)

sa maide pas

Last edited by scratchquasipro (Nov. 17, 2019 19:16:05)

-Rex-
Scratcher
500+ posts

SB3 to SB2 Converter (working)

CollabsBlendytato wrote:

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?
Your Python version is outdated. Try using Python 3.6 or later.
Electroboss
Scratcher
20 posts

SB3 to SB2 Converter (working)

wait where's the python file?
Electroboss
Scratcher
20 posts

SB3 to SB2 Converter (working)

OH! Found it.
--Explosion--
Scratcher
1000+ posts

SB3 to SB2 Converter (working)

Wow! Super cool program!
IronHead43
Scratcher
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?

Powered by DjangoBB