|
64 | 64 | }, |
65 | 65 | { |
66 | 66 | "cell_type": "code", |
67 | | - "execution_count": 4, |
| 67 | + "execution_count": 11, |
68 | 68 | "id": "51fad442", |
69 | 69 | "metadata": {}, |
70 | 70 | "outputs": [], |
71 | 71 | "source": [ |
72 | | - "session = rd.session.desktop.Definition(APP_KEY).get_session()" |
| 72 | + "session = rd.session.desktop.Definition(app_key = APP_KEY).get_session()" |
73 | 73 | ] |
74 | 74 | }, |
75 | 75 | { |
|
83 | 83 | }, |
84 | 84 | { |
85 | 85 | "cell_type": "code", |
86 | | - "execution_count": 2, |
| 86 | + "execution_count": 8, |
87 | 87 | "id": "62485c4a", |
88 | 88 | "metadata": {}, |
89 | 89 | "outputs": [], |
90 | 90 | "source": [ |
91 | 91 | "session = rd.session.platform.Definition(\n", |
92 | | - " APP_KEY, \n", |
93 | | - " rd.session.platform.GrantPassword(\n", |
| 92 | + " app_key = APP_KEY, \n", |
| 93 | + " grant = rd.session.platform.GrantPassword(\n", |
94 | 94 | " username = RDP_LOGIN, \n", |
95 | 95 | " password = RDP_PASSWORD\n", |
96 | 96 | " )\n", |
|
108 | 108 | }, |
109 | 109 | { |
110 | 110 | "cell_type": "code", |
111 | | - "execution_count": 2, |
| 111 | + "execution_count": 9, |
112 | 112 | "id": "76a9f215", |
113 | 113 | "metadata": {}, |
114 | | - "outputs": [], |
| 114 | + "outputs": [ |
| 115 | + { |
| 116 | + "ename": "AttributeError", |
| 117 | + "evalue": "Please provide 'grant' attribute or set 'username' and 'password' in config.", |
| 118 | + "output_type": "error", |
| 119 | + "traceback": [ |
| 120 | + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", |
| 121 | + "\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)", |
| 122 | + "\u001b[1;32m<ipython-input-9-ee4ef0316817>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[1;32m----> 1\u001b[1;33m session = rd.session.platform.Definition(\n\u001b[0m\u001b[0;32m 2\u001b[0m \u001b[0mapp_key\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mAPP_KEY\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 3\u001b[0m \u001b[0mdeployed_platform_host\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mDEPLOYED_PLATFORM_HOST\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 4\u001b[0m \u001b[0mdeployed_platform_username\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mDEPLOYED_PLATFORM_USER_NAME\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 5\u001b[0m ).get_session()\n", |
| 123 | + "\u001b[1;32m~\\Anaconda3\\envs\\dev6\\lib\\site-packages\\refinitiv\\data\\_data\\core\\session\\_platform_session_definition.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, session_name, app_key, grant, signon_control, deployed_platform_host, deployed_platform_username, dacs_position, dacs_application_id)\u001b[0m\n\u001b[0;32m 93\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 94\u001b[0m \u001b[1;32mif\u001b[0m \u001b[1;32mnot\u001b[0m \u001b[0mgrant\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mis_valid\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m---> 95\u001b[1;33m raise AttributeError(\n\u001b[0m\u001b[0;32m 96\u001b[0m \u001b[1;34m\"Please provide 'grant' attribute or set 'username' and 'password' in config.\"\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 97\u001b[0m )\n", |
| 124 | + "\u001b[1;31mAttributeError\u001b[0m: Please provide 'grant' attribute or set 'username' and 'password' in config." |
| 125 | + ] |
| 126 | + } |
| 127 | + ], |
115 | 128 | "source": [ |
116 | 129 | "session = rd.session.platform.Definition(\n", |
117 | | - " APP_KEY, \n", |
| 130 | + " app_key = APP_KEY, \n", |
118 | 131 | " deployed_platform_host = DEPLOYED_PLATFORM_HOST,\n", |
119 | 132 | " deployed_platform_username = DEPLOYED_PLATFORM_USER_NAME\n", |
120 | 133 | ").get_session()" |
|
160 | 173 | }, |
161 | 174 | { |
162 | 175 | "cell_type": "code", |
163 | | - "execution_count": 3, |
| 176 | + "execution_count": null, |
164 | 177 | "id": "5eb4432c", |
165 | 178 | "metadata": {}, |
166 | | - "outputs": [ |
167 | | - { |
168 | | - "data": { |
169 | | - "text/plain": [ |
170 | | - "<State.Open: 3>" |
171 | | - ] |
172 | | - }, |
173 | | - "execution_count": 3, |
174 | | - "metadata": {}, |
175 | | - "output_type": "execute_result" |
176 | | - } |
177 | | - ], |
| 179 | + "outputs": [], |
178 | 180 | "source": [ |
179 | 181 | "session.open()" |
180 | 182 | ] |
|
212 | 214 | }, |
213 | 215 | { |
214 | 216 | "cell_type": "code", |
215 | | - "execution_count": 4, |
| 217 | + "execution_count": null, |
216 | 218 | "id": "f628d577", |
217 | 219 | "metadata": {}, |
218 | 220 | "outputs": [], |
|
266 | 268 | { |
267 | 269 | "cell_type": "code", |
268 | 270 | "execution_count": null, |
269 | | - "id": "e144b211", |
| 271 | + "id": "52567fb6-86e6-4661-b09e-041fceef1cd2", |
270 | 272 | "metadata": {}, |
271 | 273 | "outputs": [], |
272 | 274 | "source": [] |
273 | 275 | } |
274 | 276 | ], |
275 | 277 | "metadata": { |
276 | 278 | "kernelspec": { |
277 | | - "display_name": "RevData39", |
| 279 | + "display_name": "rddev6", |
278 | 280 | "language": "python", |
279 | | - "name": "rd39" |
| 281 | + "name": "rddev6" |
280 | 282 | }, |
281 | 283 | "language_info": { |
282 | 284 | "codemirror_mode": { |
|
288 | 290 | "name": "python", |
289 | 291 | "nbconvert_exporter": "python", |
290 | 292 | "pygments_lexer": "ipython3", |
291 | | - "version": "3.9.4" |
| 293 | + "version": "3.8.10" |
292 | 294 | } |
293 | 295 | }, |
294 | 296 | "nbformat": 4, |
|
0 commit comments