Telescope 2.0 doesn't use
$TelescopeList
anymore and is supported for oxp compatibility. Its indexOf
function was written just for escortDeck. I'll need a copy of your version to track down the problem.Moderators: another_commander, winston
$TelescopeList
anymore and is supported for oxp compatibility. Its indexOf
function was written just for escortDeck. I'll need a copy of your version to track down the problem.Code: Select all
if( ps_mass > 1e8 ) mult = 8; //baseship scan double range third time
else if( ps_mass > 1e6 ) mult = 4; //huge player ship double range another time
ps_mass >= 1e8
in update_grav_scan()
.Code: Select all
_load_effects, Error: name 'load' is not defined
Traceback (most recent call last):
File "/tmp/collect_shipdata.py", line 486, in _load_effects
parsed = load( fp )
NameError: name 'load' is not defined
> /tmp/collect_shipdata.py(529)_load_effects()
-> CurrentFile = None
It works here, without telescope extension installed.MrFlibble wrote: ↑Sun Apr 14, 2024 4:18 pm[...]
Tried using python 2.7 and 3.10. Both spit out an error like this and give a Pdb prompt.
[...]Code: Select all
_load_effects, Error: name 'load' is not defined Traceback (most recent call last): File "/tmp/collect_shipdata.py", line 486, in _load_effects parsed = load( fp ) NameError: name 'load' is not defined > /tmp/collect_shipdata.py(529)_load_effects() -> CurrentFile = None
Does it work for anyone else on a current Linux?
Code: Select all
** Failed to locate Telescope oxp, cannot update.
Processed 5 files, new entities registered: 229
input: shipdata 213,682
output: required 0
generated 103,289
total 103,289
Thank you.Commander_X wrote: ↑Sun Apr 14, 2024 8:55 pmI didn't encounter your error, but it seems that it should be caused by the fact that at line 486 is used a "load" call which should be replaced with "readPlistFile" for python 3.x (as defined on line 21). Although the "readPlistStream" (imported next) is used once in the file, the "readPlistFile" is not, which leads me to think line 486 was left unprocessed during python2/3 adjustment.
Code: Select all
parsed = readPlistFile( fp )
Code: Select all
Collected 2218 ents from 73 files, output is 786475
ouput_update, 'module' object has no attribute 'unpack_archive'
Traceback (most recent call last):
File "collect_shipdata.py", line 2114, in ouput_update
shutil.unpack_archive(TelescopeOxz, tmpFolder, 'zip')
AttributeError: 'module' object has no attribute 'unpack_archive'
--Return--
> /tmp/collect_shipdata.py(2152)ouput_update()->None
-> pdb.set_trace()
Traceback (most recent call last):
File "collect_shipdata.py", line 2425, in <module>
sys.exit(1 if main() else 0)
File "collect_shipdata.py", line 2406, in main
err, update = update_eff_data()
File "collect_shipdata.py", line 2212, in update_eff_data
fallback = ouput_update(output)
File "collect_shipdata.py", line 2152, in ouput_update
pdb.set_trace()
File "/usr/lib/python2.7/bdb.py", line 53, in trace_dispatch
return self.dispatch_return(frame, arg)
File "/usr/lib/python2.7/bdb.py", line 88, in dispatch_return
self.user_return(frame, arg)
File "/usr/lib/python2.7/pdb.py", line 190, in user_return
self.interaction(frame, None)
File "/usr/lib/python2.7/pdb.py", line 210, in interaction
self.cmdloop()
File "/usr/lib/python2.7/cmd.py", line 130, in cmdloop
line = raw_input(self.prompt)
I'm using an AppleMac and know nothing about any of this. I thought that OXPs were in OpenStep/XML or Javascript, not Python. How would I tell if I have Python 3 or 2? I presume that this is why I only sometimes see the Masslock borders.
The script gleans ship data for the 3d views in telescope and inserts a plist into the OXP. It needs to be run when ships are added to the OXP mix if you use the 3d views else you'll get question marks for non-core ships. The python script is in the OXZ, and can be extracted to anywhere for execution.Cholmondely wrote: ↑Mon Apr 15, 2024 4:11 pmI'm using an AppleMac and know nothing about any of this. I thought that OXPs were in OpenStep/XML or Javascript, not Python. How would I tell if I have Python 3 or 2? I presume that this is why I only sometimes see the Masslock borders.
Code: Select all
python --version
Code: Select all
ls -al $(which python)
Yes, it seems there is a bit of love/hate relationship between Apple and Python community -- you might be able to pick more current versions from homebrew or the other brew channels.Cholmondely wrote: ↑Mon Apr 15, 2024 4:27 pm[...]
I've got Python 2.7.16 on my 2020 AppleMac.
[...]
The new break seems to be caused by the fact that there is no unpack_archive in shutil module of python 2 (2.7.18 version, here), only in python 3.MrFlibble wrote: ↑Mon Apr 15, 2024 2:11 pm[...]
Changed line 486 toand all runs well in python 3.10.Code: Select all
parsed = readPlistFile( fp )
It now breaks differently in python 2.7, but I doubt that is of current relevance as python 3 ought to be default for most folk by now.
[...]