Coder Social home page Coder Social logo

lotss-query's People

Contributors

lmorabit avatar mhardcastle avatar twshimwell avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

lmorabit

lotss-query's Issues

bad_pointings

Hey,

In my setup:

except KeyError:
    bad_pointings = ['']

should be:

except AttributeError:
    bad_pointings = ['']

ERROR | Password is required for key ~/.ssh/id_rsa

Hi trying to access lotss database,

In [1]: from surveys_db import SurveysDB

In [2]: sdb=SurveysDB()
2022-02-07 15:48:00,769| ERROR   | Password is required for key /home/cyril.tasse/.ssh/id_rsa

my ~/.surveys file looks like

<theCommonSLotssPWD>
tasse
id_rsa.survey

and my .ssh/config

ForwardAgent yes
ForwardX11 yes

The problems happens here:

self.tunnel=sshtunnel.SSHTunnelForwarder('lofar.herts.ac.uk',

Whatever option I played with

 sshtunnel.SSHTunnelForwarder(
    ssh_address_or_host=None,
    ssh_config_file='~/.ssh/config',
    ssh_host_key=None,
    ssh_password=None,
    ssh_pkey=None,
    ssh_private_key_password=None,
    ssh_proxy=None,
    ssh_proxy_enabled=True,
    ssh_username=None,
    local_bind_address=None,
    local_bind_addresses=None)

leep to the same message and sshtunnel keeps using ~/.ssh/id_rsa private key

Also

cyril.tasse@nancep6:~$ ssh -i ~/.ssh/id_rsa.survey [email protected]
Last login: Mon Feb  7 15:42:32 2022 from nancep6.obs-nancay.fr
tasse@lofar-server:~$ logout
Connection to lofar.herts.ac.uk closed.
cyril.tasse@nancep6:~$ ssh -i ~/.ssh/id_rsa [email protected]
Last login: Mon Feb  7 16:02:14 2022 from nancep6.obs-nancay.fr

both work...

So I'm a little bit dry, any idea?

Trying to access the DB

Hi -

I'm trying to make a db query, my .surveys file is

<thepwd>
tasse
id_rsa.survey

and in ipython:

In [2]: from surveys_db import SurveysDB

In [3]: with SurveysDB() as sdb:
   ...:     sdb.cur.execute('select * from transients')
   ...:     result=sdb.cur.fetchall()
   ...:
2021-05-26 07:38:16,444| ERROR   | Password is required for key /home/cyril.tasse/.ssh/id_rsa
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-a36669045cb0> in <module>
----> 1 with SurveysDB() as sdb:
      2     sdb.cur.execute('select * from transients')
      3     result=sdb.cur.fetchall()
      4     

/data/cyril.tasse/VE_Py3_nancep6/sources/lotss-query/surveys_db.py in __init__(self, readonly, verbose, survey)
    167                 self.tunnel.start()
    168                 localport=self.tunnel.local_bind_port
--> 169                 self.con = mdb.connect('127.0.0.1', 'survey_user', self.password, self.database, port=localport, cursorclass=mdbcursors.DictCursor)
    170             else:
    171                 connected=False

TypeError: __init__() takes 1 positional argument but 5 positional arguments (and 2 keyword-only arguments) were given
> /data/cyril.tasse/VE_Py3_nancep6/sources/lotss-query/surveys_db.py(169)__init__()
    167                 self.tunnel.start()
    168                 localport=self.tunnel.local_bind_port
--> 169                 self.con = mdb.connect('127.0.0.1', 'survey_user', self.password, self.database, port=localport, cursorclass=mdbcursors.DictCursor)
    170             else:
    171                 connected=False

there are two errors it seems, that I tried to debug myself without success...

The first is

ERROR | Password is required for key /home/cyril.tasse/.ssh/id_rsa

I don't get it cos I've checked and the string id_rsa.survey is properly propagated to ssh_pkey of SSHTunnelForwarder

Then the error itself, I was thinking, maybe it's due to

try:
    import MySQLdb as mdb
    import MySQLdb.cursors as mdbcursors
except ImportError:
    import pymysql as mdb
    import pymysql.cursors as mdbcursors

cos in my setup I'm using pymysql...?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.