14 Replies Latest reply on Feb 2, 2017 8:01 AM by Matt Coles

    Error during connect test

    Lazy Rambler

      Hi Guys,

       

      This is the error I've been getting when trying to run a test to see if vizalerts can connect. I haven't installed the tilio module yet, as it is optional.

       

      I've tried this on version 10.1

       

      Traceback (most recent call last):

        File "C:\VizAlerts-master\VizAlerts-master\vizalerts.py", line 27, in <module>

       

       

          from vizalert import emailaction

        File "C:\VizAlerts-master\VizAlerts-master\vizalert\emailaction.py", line 29,

      in <module>

          import vizalert

        File "C:\VizAlerts-master\VizAlerts-master\vizalert\vizalert.py", line 21, in

      <module>

          import smsaction

        File "C:\VizAlerts-master\VizAlerts-master\vizalert\smsaction.py", line 6, in

      <module>

          import phonenumbers

      ImportError: No module named phonenumbers

       

        • 1. Re: Error during connect test
          Matt Coles

          It's actually not optional (though using the SMS is), we need to fix the documentation still. Sorry about that! pip install both of the other modules and you should no longer get this error.

          1 of 1 people found this helpful
          • 2. Re: Error during connect test
            Lazy Rambler

            Thanks Matt. Do not get the error now.

             

            I still do not get the simple alert test, but I'll go to the other thread where someone else posted the same question

            • 3. Re: Error during connect test
              Lazy Rambler

              Hi Matt,

              Getting a different/new error this time. I did fill up the details in the yaml file, and check to see if it is valid, and yes, it is. This is what the logs say/ Thoughts ?

               

              MainThread - 2017-01-05 12:17:27 - [INFO] - LoggerQuickSetup - Logging initialized, writing to .\logs\vizalerts.log_2017-01-05.log

              MainThread - 2017-01-05 12:17:27 - [INFO] - main - VizAlerts v2.0.0 is starting

              MainThread - 2017-01-05 12:17:27 - [ERROR] - validate_conf - An exception was raised loading the config file .\config\vizalerts.yaml: (<type 'exceptions.IOError'>, IOError(2, 'No such file or directory'), <traceback object at 0x032CA468>) Stacktrace: <traceback object at 0x032CA468>

              MainThread - 2017-01-05 12:17:27 - [ERROR] - <module> - An unhandled exception occurred: Traceback (most recent call last):

                File "C:\VizAlerts-master\VizAlerts-master\vizalerts.py", line 441, in <module>

                  main()

                File "C:\VizAlerts-master\VizAlerts-master\vizalerts.py", line 83, in main

                  config.validate_conf(configfile)

                File "C:\VizAlerts-master\VizAlerts-master\vizalert\config.py", line 59, in validate_conf

                  sys.exit(1)

              SystemExit: 1

              Traceback (most recent call last):

                File "C:\VizAlerts-master\VizAlerts-master\vizalerts.py", line 441, in <module>

                  main()

                File "C:\VizAlerts-master\VizAlerts-master\vizalerts.py", line 83, in main

                  config.validate_conf(configfile)

                File "C:\VizAlerts-master\VizAlerts-master\vizalert\config.py", line 59, in validate_conf

                  sys.exit(1)

              SystemExit: 1

              • 4. Re: Error during connect test
                Matt Coles

                Hey Lazy, it's saying that it can't find the config file:

                 

                No such file or directory

                 

                If you don't specify the config file as a command-line parameter, VizAlerts will assume that it can be found at .\config\vizalerts.yaml. So if you aren't running VizAlerts with C:\VizAlerts-master\VizAlerts-master as your working directory, it won't find it. If you didn't switch directories already, just do this:

                 

                cd C:\VizAlerts-master\VizAlerts-master

                python vizalerts.py

                 

                Lemme know if that works/doesn't. If not, it's either the file was renamed or a file permissions issue of some kind.

                • 5. Re: Error during connect test
                  Lazy Rambler

                  Thanks Matt. Silly me! Should have figured it out. The test worked, I got the 30 emails. Time to go ahead, and learn more.

                   

                  Thanks again.

                  • 6. Re: Error during connect test
                    Matt Coles

                    Woo! Have fun.

                    • 7. Re: Error during connect test
                      David Cason

                      Hi Matt-

                       

                      I'm running into the same issue, but getting confused about the path.  I have VizAlerts installed at c:\VizAlerts.  Do I need to change this path somewhere?  I didn't see this in the config yaml.  I've also tried installing to C:\VizAlerts-master\VizAlerts-master as well and get the same error.

                      • 8. Re: Error during connect test
                        Matt Coles

                        Hey David, you don't need to change the path. C:\VizAlerts is fine. You just need to make sure you're kicking off the Python script from within the C:\VizAlerts directory, then:

                         

                        cd c:\VizAlerts

                        python vizalerts.py

                        • 9. Re: Error during connect test
                          jens.bruckmann

                          Hi Matt,

                           

                          I am facing a similia issue:

                          any Idea?

                          • 10. Re: Error during connect test
                            David Cason

                            Same issue....I think it may be my computer....I'm going to test on another sandbox VM and see if I get the same error.

                            • 11. Re: Error during connect test
                              Matt Coles

                              The issue is that Python doesn't seem to have the "yaml" package installed. If you installed Python 2.7.9 from the exe linked in the Install Guide, it should have automatically installed itself. If you used some other version, or had Python installed previously, then perhaps it wasn't included at the time you installed it. Check your Python version. Could also be a mismatch between the version of Python (64 vs 32 bit) and the package, perhaps? You could probably also work around this issue by calling "pip install yaml". But you might get a similar error with other packages, and have to continue working through issues this way.

                              1 of 1 people found this helpful
                              • 12. Re: Error during connect test
                                jens.bruckmann

                                perfect, that´s it. There was indeed a missmatch between 64 and 32 bit. Thanks

                                • 13. Re: Error during connect test
                                  jens.bruckmann

                                  Hi Matt, me again

                                   

                                  I am now facing anoth issue. I first thought it has something to do with the path but my error looks a little bit different:

                                   

                                   

                                  any Idea more than welcome

                                  • 14. Re: Error during connect test
                                    Matt Coles

                                    This means you have some bad formatting in your yaml file. See:

                                     

                                    VizAlert Error - ScannerError()

                                     

                                    (it's an older thread, so the yaml was quite different then--but same idea).

                                     

                                    Common issues are tab characters (not allowed in yaml), quotes not closed, etc.