Board index FlightGear Support Multiplayer

Problem with terrasync.py script.  Topic is solved

Trouble getting online, setting up a server?
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- copy&paste your commandline.

Please, also see Requesting Technical Help.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Problem with terrasync.py script.

Postby Dogers » Tue May 28, 2019 1:02 pm

Greetings to everyone.

I post here, but I am not sure if the report is suited for this sub-forum, feel free to move it if not suited for here.

I wanted to download all the terrasync scenery with the terrasync.py script available here :

http://wiki.flightgear.org/TerraSync

I run the script with this command :

Code: Select all
python terrasync.py --target=/home/dogers/Downloads


And I got and error :
Code: Select all
Traceback (most recent call last):
  File "terrasync.py", line 24, in <module>
    import terrasync.main
  File "/home/dogers/Downloads/terrasync.py", line 24, in <module>
    import terrasync.main
ImportError: No module named main


What's the problem with my command did I did something wrong or maybe the script has a bug ?

I run Debian Testing 64 bits.

Thank you by advance for help.
Scenery contributions :

LFVM - LFVP - FMEE - FMCZ
User avatar
Dogers
 
Posts: 45
Joined: Thu May 05, 2016 4:36 pm
Location: Marseille,France
Callsign: F-DGRS, Dogers
Version: 2018.3.2
OS: FreeBSD 12.0

Re: Problem with terrasync.py script.  

Postby wkitty42 » Tue May 28, 2019 5:33 pm

i've set terrasync.py to be executable so i do not invoke python3 directly...

Code: Select all
chmod +x terrasync.py


my kubuntu has both, python (v2.x) and python3 (v3.x) installed...

the very first line in terrasync.py is
Code: Select all
#! /usr/bin/env python3

so you need to be using python v3.xxx instead of python v2...

there's also a directory that's needed to go with terrasync.py... it is named "terrasync" and contains
Code: Select all
__pycache__/
exceptions.py
__init__.py
main.py
virtual_path.py

this terrasync directory is where all the real code goes to make terrasync.py work instead of how it used to be with everything in one source file...

just in case, what does "$ python --version ; python3 --version" return? mine says this...
Code: Select all
Python 2.7.6
Python 3.4.3
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5648
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Problem with terrasync.py script.

Postby Dogers » Tue May 28, 2019 6:24 pm

Thank you for your response.

I feel really dumb here, in fact I have not see that I needed to download a folder, I thought it was only a simple script.

Thank you very much, problem fixed !
Scenery contributions :

LFVM - LFVP - FMEE - FMCZ
User avatar
Dogers
 
Posts: 45
Joined: Thu May 05, 2016 4:36 pm
Location: Marseille,France
Callsign: F-DGRS, Dogers
Version: 2018.3.2
OS: FreeBSD 12.0

Re: Problem with terrasync.py script.

Postby wkitty42 » Tue May 28, 2019 8:26 pm

it used to be a simple script... if you build the FG unstable branch (aka next) with the download_and_compile.sh script, you'll find the scripts in "[your path]/next/flightgear/scripts/python/TerraSync"... i have no idea if they are included with the builds from the PPA...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5648
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5


Return to Multiplayer

Who is online

Users browsing this forum: No registered users and 0 guests