246
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 25 Jul 2023
246 points (96.9% liked)
Fediverse
27735 readers
358 users here now
A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, KBin, etc).
If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!
Rules
- Posts must be on topic.
- Be respectful of others.
- Cite the sources used for graphs and other statistics.
- Follow the general Lemmy.world rules.
Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration), Search Lemmy
founded 1 year ago
MODERATORS
First, edit the .ini file with your lemmy servers, usernames and passwords.
Then make sure you have python interpreter with requests installed. You can check this with
python3 -m pip show requests
. if it says something like package not found, you should look into how to install python requests on your operatation system. If you downloaded it from python.org,python3 -m pip install --user requests
should work.Then you can do
python3 lemmy-migrate.py -c config.ini
. Let me know if you run into any problems!Thank you, helpful person!
I edited the .ini file and installed python 3.11.4 without problems.
When I type
py
in powershell it repliesPython 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32
, so it was obviously installed successfully.However, when I copypasta the commands you posted I always get the same reply for each, that python could not be found. What does that mean? Do I maybe have to put a filepath into the command somewhere? Do requests have to be installed separately? What is the meaning of all this, the universe and everything and why does my back always hurt?
I bet replacing python3 with py will work:
worked but also returned a warning:
WARNING: The script normalizer.exe is installed in 'C:\Users\Username\AppData\Roaming\Python\Python311\Scripts' which is not on PATH.
does not work and returns an error:
C:\Users\Username\AppData\Local\Programs\Python\Python311\python.exe: can't open file 'C:\Users\Username\lemmy-migrate.py': [Errno 2] No such file or directory
I guess I have to place the files in a certain directory, putting them in the python folder did not help though.
Just make sure that you run the
py lemmy-migrate.py -c config.ini
command in the same folder that has the python script and your edited config file.Please help me further, we got close, I can feel it!
Did you try my suggestion in this comment?
https://lemmy.sdf.org/comment/1491482
I think your problem is that you aren't pointing PowerShell at the right folder. You can use the
cd
command to get to the right folder containing the python script and config file.It is weird. I can navigate to the folder in powershell without a problem.
C:\Users\Username\Desktop\lemmy_migrate-1.1.0>
But when I execute
py lemmy-migrate.py -c config.ini
in there I get
C:\Users\Username\AppData\Local\Programs\Python\Python311\python.exe: can't open file 'C:\Users\Username\Desktop\lemmy_migrate-1.1.0\lemmy-migrate.py': [Errno 2] No such file or directory
Edit:
Found the problem, it´s
py lemmy_migrate.py -c config.ini
and not
py lemmy-migrate.py -c config.ini
Thank you for the help!