Jump to content

python experts


kevinUsa

Recommended Posts

9 minutes ago, VictoryTDP said:

Kevinu you are printing the string student instead of the object

ade artham ayindi changed it 

got it finally was trying to use a join 

 

Link to comment
Share on other sites

8 hours ago, kevinUsa said:
import sqlite3
conn = sqlite3.connect('aaa.sqlite')
cur = conn.cursor()
 
cur.execute('DROP TABLE IF EXISTS Student')
cur.execute('DROP TABLE IF EXISTS Courses')
 
cur.execute('CREATE TABLE Student(name TEXT, Student_id INTEGER, course_id INTEGER)')
 
cur.execute('CREATE TABLE Courses (course_id INTEGER, Course_name TEXT)')
 
cur.execute('INSERT INTO Student (name, Student_id, course_id ) VALUES (?,?,?)', ( 'TOm', '20044844', '12345' ))
cur.execute('INSERT INTO Courses (course_id ,Course_name) VALUES (?,?)', ( '12345','maths' ))
cur.execute('SELECT name, Student_id FROM Student')
 
print('Student')
print('Courses')
 
conn.commit()

Bro ekkada nerchukuntav..

Link to comment
Share on other sites

16 hours ago, kevinUsa said:
import sqlite3
conn = sqlite3.connect('aaa.sqlite')
cur = conn.cursor()
 
cur.execute('DROP TABLE IF EXISTS Student')
cur.execute('DROP TABLE IF EXISTS Courses')
 
cur.execute('CREATE TABLE Student(name TEXT, Student_id INTEGER, course_id INTEGER)')
 
cur.execute('CREATE TABLE Courses (course_id INTEGER, Course_name TEXT)')
 
cur.execute('INSERT INTO Student (name, Student_id, course_id ) VALUES (?,?,?)', ( 'TOm', '20044844', '12345' ))
cur.execute('INSERT INTO Courses (course_id ,Course_name) VALUES (?,?)', ( '12345','maths' ))
cur.execute('SELECT name, Student_id FROM Student')
 
print('Student')
print('Courses')
 
conn.commit()

error log lo Traceback post chey 

Link to comment
Share on other sites

  • 2 weeks later...

'C:\Users\kevin\.conda\envs\mynewflaskenv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-ez6s8p3w\\MarkupSafe\\setup.py'"'"'; __file__='"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-ez6s8p3w\\MarkupSafe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\kevin\AppData\Local\Temp\pip-install-ez6s8p3w\MarkupSafe\pip-egg-info'
         cwd: C:\Users\kevin\AppData\Local\Temp\pip-install-ez6s8p3w\MarkupSafe\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\kevin\AppData\Local\Temp\pip-install-ez6s8p3w\MarkupSafe\setup.py", line 6, in <module>
        from setuptools import setup, Extension, Feature
    ImportError: cannot import name 'Feature' from 'setuptools' (C:\Users\kevin\.conda\envs\mynewflaskenv\lib\site-packages\setuptools\__init__.py)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Link to comment
Share on other sites

this error coming when I am trying to install flash and others 

alembic==0.9.9
blinker==1.4
chardet==3.0.4
click==6.7
Flask==1.0.2
Flask-Dance==0.14.0
Flask-DebugToolbar==0.10.1
Flask-Login==0.4.1
Flask-Migrate==2.1.1
Flask-OAuth==0.12
Flask-OAuthlib==0.9.4
Flask-SQLAlchemy==2.3.2
Flask-WTF==0.14.2
httplib2==0.11.3
idna==2.6
itsdangerous==0.24
Jinja2==2.10
lazy==1.3
Mako==1.0.7
MarkupSafe==1.0
oauth2==1.9.0.post1
oauthlib==2.0.7
python-dateutil==2.7.2
python-editor==1.0.3
requests==2.18.4
requests-oauthlib==0.8.0
six==1.11.0
SQLAlchemy==1.2.6
SQLAlchemy-Utils==0.33.2
urllib3==1.22
URLObject==2.4.3
Werkzeug==0.14.1
wincertstore==0.2
WTForms==2.1
 

Link to comment
Share on other sites

4 hours ago, kevinUsa said:

'C:\Users\kevin\.conda\envs\mynewflaskenv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-ez6s8p3w\\MarkupSafe\\setup.py'"'"'; __file__='"'"'C:\\Users\\kevin\\AppData\\Local\\Temp\\pip-install-ez6s8p3w\\MarkupSafe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\kevin\AppData\Local\Temp\pip-install-ez6s8p3w\MarkupSafe\pip-egg-info'
         cwd: C:\Users\kevin\AppData\Local\Temp\pip-install-ez6s8p3w\MarkupSafe\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\kevin\AppData\Local\Temp\pip-install-ez6s8p3w\MarkupSafe\setup.py", line 6, in <module>
        from setuptools import setup, Extension, Feature
    ImportError: cannot import name 'Feature' from 'setuptools' (C:\Users\kevin\.conda\envs\mynewflaskenv\lib\site-packages\setuptools\__init__.py)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

try to downgade your setup tools installation ; there is some deprecation in in the code for setup tools apparently.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...