AnotherFoxGuy / weatherspect

WeatherSpect - A virtual weather environment in ASCII
6 stars 2 forks source link

do not launch, only show several loaded modules #7

Open qw3r3wq opened 3 years ago

qw3r3wq commented 3 years ago

Trying to run it on Debian testing,

rusla@x201:~/git/weatherspect$ dpkg -l | grep perl | grep -i curses
ii  libcurses-perl                        1.37-1+b1                           amd64        Curses interface for Perl
rusla@x201:~/git/weatherspect$

Also, I have Term::Animate 2.6 library added. In the weatherspect I see you use 2.5, might it be a case?

rusla@x201:~/git/weatherspect$ perl ./weatherspect 
Subroutine import redefined at ./weatherspect line 5558.
Subroutine jsonToObj redefined at ./weatherspect line 5605.
Subroutine objToJson redefined at ./weatherspect line 5615.
Subroutine to_json redefined at ./weatherspect line 5628.
Subroutine from_json redefined at ./weatherspect line 5648.
Subroutine true redefined at ./weatherspect line 5666.
Subroutine false redefined at ./weatherspect line 5668.
Subroutine boolean redefined at ./weatherspect line 5670.
Subroutine null redefined at ./weatherspect line 5675.
Subroutine require_xs_version redefined at ./weatherspect line 5678.
Subroutine backend redefined at ./weatherspect line 5680.
Subroutine is_xs redefined at ./weatherspect line 5688.
Subroutine is_pp redefined at ./weatherspect line 5693.
Subroutine pureperl_only_methods redefined at ./weatherspect line 5698.
Subroutine property redefined at ./weatherspect line 5701.
Subroutine __load_xs redefined at ./weatherspect line 5738.
Subroutine _load_xs redefined at ./weatherspect line 5759.
Subroutine __load_pp redefined at ./weatherspect line 5772.
Subroutine _load_pp redefined at ./weatherspect line 5793.
Subroutine init redefined at ./weatherspect line 5806.
Subroutine is_xs redefined at ./weatherspect line 5843.
Subroutine is_pp redefined at ./weatherspect line 5844.
Subroutine init redefined at ./weatherspect line 5860.
Subroutine is_xs redefined at ./weatherspect line 5893.
Subroutine is_pp redefined at ./weatherspect line 5894.
Subroutine support_by_pp redefined at ./weatherspect line 5896.
rusla@x201:~/git/weatherspect$ git status -v
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
rusla@x201:~/git/weatherspect$ git pull
Already up to date.
rusla@x201:~/git/weatherspect$ cat ~/.weatherspect 
# use ansi color (0 = no, 1 = yes)
color: 1

# run in debug mode (0 = no, 1 = yes)
debug: 1

# Units format ( metric or imperial )
display_units: metric

# how many random things to animate at once
entities: 2

# how long (in seconds) to sleep between frames
frame_delay: 0.2

# City / City, State / City, Country / Country
location: Vilnius

# how often (in seconds) to attempt to retrieve weather data
retr_interval: 600

# how long (in seconds) trees should live
tree_lifespan: 3600

# the version of weatherspect this config was generated with
version: 2.00

rusla@x201:~/git/weatherspect$ 

Debug file contains:

cat debug 
$VAR1 = [
          {
            'dewpoint_fahrenheit' => '25',
            'dewpoint_celsius' => '-4',
            'conditions' => 'heavy Snow',
            'wind_kilometersperhour' => '18',
            'clouds' => 'Clear (FEW) : -',
            'temperature_fahrenheit' => '36',
            'wind_milesperhour' => 18,
            'fahrenheit' => '36',
            'wind_direction' => 'SSE',
            'humidity' => '65',
            'celsius' => '2',
            'moonphase' => 'Waning Crescent',
            'updated' => '11:53 AM AKDT on September 30, 2005',
            'place' => 'Nome, Alaska',
            'visibility_miles' => '10.0',
            'visibility_kilometers' => '16.1',
            'pressure' => '29.66 in 1004 hPa',
            'temperature_celsius' => '2'
          }
        ];

$VAR1 = [
          {
            'updated' => '11:53 AM AKDT on September 30, 2005',
            'place' => 'Nome, Alaska',
            'humidity' => '65',
            'temperature_fahrenheit' => '36',
            'conditions' => 'heavy Rain',
            'pressure' => '29.66 in 1004 hPa',
            'wind_milesperhour' => 16,
            'clouds' => 'Clear (CLR) : -',
            'visibility_miles' => '10.0',
            'visibility_kilometers' => '16.1',
            'moonphase' => 'Waning Crescent',
            'dewpoint_celsius' => '-4',
            'fahrenheit' => '36',
            'wind_direction' => 'SSW',
            'dewpoint_fahrenheit' => '25',
            'temperature_celsius' => '2',
            'wind_kilometersperhour' => '18',
            'celsius' => '2'
          }
        ];

$VAR1 = [
          {
            'celsius' => '2',
            'conditions' => 'Rain',
            'pressure' => '29.66 in 1004 hPa',
            'wind_milesperhour' => 9,
            'humidity' => '65',
            'updated' => '11:53 AM AKDT on September 30, 2005',
            'wind_direction' => 'SSW',
            'temperature_celsius' => '2',
            'fahrenheit' => '36',
            'dewpoint_celsius' => '-4',
            'temperature_fahrenheit' => '36',
            'dewpoint_fahrenheit' => '25',
            'visibility_kilometers' => '16.1',
            'wind_kilometersperhour' => '18',
            'visibility_miles' => '10.0',
            'place' => 'Nome, Alaska',
            'moonphase' => 'Waning Crescent',
            'clouds' => 'Clear (CLR) : -'
          }
        ];
usla@x201:~/git/weatherspect$ perl --version

This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-linux-gnu-thread-multi
(with 46 registered patches, see perl -V for more detail)

Copyright 1987-2021, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

rusla@x201:~/git/weatherspect$
qw3r3wq commented 3 years ago

perl -d ./weatherspect shows:

Not a HASH reference at ./weatherspect line 371.
                                                 at ./weatherspect line 371.
                                                                                main::update_weather(0) called at ./weatherspect line 106
                                                                                                                                            main::main() called at ./weatherspect line 87
                               Debugged program terminated.  Use q to quit or R to restart,
                                                                                           use o inhibit_exit to avoid stopping after program termination,
                                                                                                                                                          h q, h R or h o to get additional info.
                                     DB<2> 
rusla@x201:~/git/weatherspect$

Also this with debug disabled in config file:

Can't locate object method "new" via package "JSON" at ./weatherspect line 4994.
                                                                                 at ./weatherspect line 4994.
                                                                                                                Weather::OpenWeatherMap::Weatherspect::get_weather(Weather::OpenWeatherMap::Weatherspect=HASH(0x55e70ed5c328)) called at ./weatherspect line 349
                                                                                                    main::update_weather(0) called at ./weatherspect line 106
    main::main() called at ./weatherspect line 87
                                                     Debugged program terminated.  Use q to quit or R to restart,
                                                                                                                 use o inhibit_exit to avoid stopping after program termination,
                  h q, h R or h o to get additional info.
v4hn commented 1 year ago

too bad this is broken right now...

AnotherFoxGuy commented 1 year ago

Is this still an issue? I just tested it on Ubuntu 20.21 and it seems to work fine except for a couple of warnings (#6)

v4hn commented 1 year ago

Still not working on debian testing right now. Maybe it doesn't break on Ubuntu before 22.04/10?

Fryles commented 2 days ago

Solved this by removing the JSON package section at the bottom of the file. Not sure if a PR is the right move since it was probably there for a reason. Hope this helps anyone still trying to get this to work!