-
Notifications
You must be signed in to change notification settings - Fork 202
Error when using setup using bash #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @AhmedMohammedMostafa I just updated the image! Please try again with the tag docker pull zeroxeli/readme-ai:0.0.4 And to run: # Run with Docker
docker run -it \
-e OPENAI_API_KEY="YOUR_API_KEY" \
-v "$(pwd)":/app \
-w /app zeroxeli/readme-ai:0.0.4 \
python src/main.py -o readme-ai.md -r https://github.com/eli64s/readme-ai |
@eli64s Worked but got an error INFO README-AI is now executing.
INFO OpenAI API key validation successful.
INFO Model: {'endpoint': 'https://api.openai.com/v1/chat/completions', 'engine': 'gpt-3.5-turbo', 'encoding': 'cl100k_base', 'rate_limit': 5, 'tokens': 600, 'tokens_max': 4000, 'temperature': 0.9, 'api_key': '****************'}
INFO Repository: GitConfig(repository='https://github.com/AhmedMohammedMostafa/Reverse-Image-Search', name='Reverse-Image-Search')
INFO Dependencies: ['', '_document.js', 'cors', 'json5', 'express', 'helmet', 'javascript', 'jsconfig.json', 'UploadTab.jsx', 'upload.js', '.eslintrc.json', 'search.js', 'weaviate-ts-client', 'jsx', 'markdown', 'next', 'json', 'weaviate.js', 'index.js', 'package.json', 'next.config.js', '.gitignore', 'react', 'react-dom', 'eslint', 'globals.css', 'js', 'SearchTab.jsx', 'ant-design', 'stored-images.js', 'package-lock.json', 'yml', 'svg', 'weaviate-client', 'docker-compose.yml', 'README.md', 'vercel.svg', 'antd', '_app.js', 'md', 'eslint-config-next', 'axios', 'next.svg', 'Images.jsx', 'yaml', 'css', 'hello.js']
INFO Total files: 27
WARNING Ignoring file: README.md
WARNING Ignoring file: client/package.json
WARNING Ignoring file: client/jsconfig.json
WARNING Ignoring file: client/.eslintrc.json
WARNING Ignoring file: client/docker-compose.yml
WARNING Ignoring file: client/package-lock.json
WARNING Ignoring file: client/README.md
WARNING Ignoring file: client/.gitignore
WARNING Ignoring file: client/public/vercel.svg
WARNING Ignoring file: client/public/next.svg
WARNING Ignoring file: api/package.json
WARNING Ignoring file: api/package-lock.json
WARNING Ignoring file: api/.gitignore
ERROR Task failed with exception: RetryError[<Future at 0x5505283f70 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x550646deb0 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x5504c26190 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x5506488c70 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x55052ad7c0 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x5505299400 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x55052834f0 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x5505304190 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x55052998b0 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x5505216b20 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x55052ad8e0 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x5505304760 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x550521ca90 state=finished raised AttributeError>]
ERROR Task failed with exception: RetryError[<Future at 0x550521c790 state=finished raised AttributeError>]
ERROR Exception: RetryError[<Future at 0x55052a8d30 state=finished raised AttributeError>]
INFO README file generated at: /app/readme-ai.md
unhandled exception during asyncio.run() shutdown
task: <Task finished name='Task-17' coro=<OpenAIHandler.generate_text() done, defined at /usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py:86> exception=RetryError(<Future at 0x5504b3c4f0 state=finished raised AttributeError>)>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
yield
File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 51, in write
await self._stream.send(item=buffer)
File "/usr/local/lib/python3.9/site-packages/anyio/streams/tls.py", line 203, in send
await self._call_sslobject_method(self._ssl_object.write, item)
File "/usr/local/lib/python3.9/site-packages/anyio/streams/tls.py", line 169, in _call_sslobject_method
await self.transport_stream.send(self._write_bio.read())
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 1233, in send
raise ClosedResourceError
anyio.ClosedResourceError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 572, in __aiter__
async for chunk in self._connection._receive_response_body(
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 313, in _receive_response_body
event = await self._receive_stream_event(request, stream_id)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 333, in _receive_stream_event
await self._receive_events(request, stream_id)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 385, in _receive_events
await self._write_outgoing_data(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 481, in _write_outgoing_data
raise exc
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 469, in _write_outgoing_data
await self._network_stream.write(data_to_send, timeout)
File "/usr/local/lib/python3.9/site-packages/httpcore/_backends/anyio.py", line 51, in write
await self._stream.send(item=buffer)
File "/usr/local/lib/python3.9/contextlib.py", line 137, in __exit__
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.WriteError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/src/model.py", line 169, in generate_text
response = await self.http_client.post(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1631, in send
raise exc
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1625, in send
await response.aread()
File "/usr/local/lib/python3.9/site-packages/httpx/_models.py", line 909, in aread
self._content = b"".join([part async for part in self.aiter_bytes()])
File "/usr/local/lib/python3.9/site-packages/httpx/_models.py", line 909, in <listcomp>
self._content = b"".join([part async for part in self.aiter_bytes()])
File "/usr/local/lib/python3.9/site-packages/httpx/_models.py", line 927, in aiter_bytes
async for raw_bytes in self.aiter_raw():
File "/usr/local/lib/python3.9/site-packages/httpx/_models.py", line 985, in aiter_raw
async for raw_stream_bytes in self.stream:
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 146, in __aiter__
async for chunk in self._stream:
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 239, in __aiter__
async for part in self._httpcore_stream:
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 347, in __aiter__
async for part in self._stream:
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 581, in __aiter__
await self.aclose()
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 589, in aclose
await self._connection._response_closed(stream_id=self._stream_id)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 407, in _response_closed
async with self._state_lock:
File "/usr/local/lib/python3.9/site-packages/httpcore/_synchronization.py", line 53, in __aenter__
await self._anyio_lock.acquire()
File "/usr/local/lib/python3.9/site-packages/anyio/_core/_synchronization.py", line 131, in acquire
await event.wait()
File "/usr/local/lib/python3.9/asyncio/locks.py", line 226, in wait
await fut
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 50, in __call__
result = await fn(*args, **kwargs)
File "/app/src/model.py", line 194, in generate_text
except openai.OpenAIException as excinfo:
AttributeError: module 'openai' has no attribute 'OpenAIException'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 47, in __call__
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.9/site-packages/tenacity/__init__.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x5504b3c4f0 state=finished raised AttributeError>]
unhandled exception during asyncio.run() shutdown
task: <Task finished name='Task-19' coro=<OpenAIHandler.generate_text() done, defined at /usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py:86> exception=RetryError(<Future at 0x550521aac0 state=finished raised AttributeError>)>
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/h2/connection.py", line 224, in process_input
func, target_state = self._transitions[(self.state, input_)]
KeyError: (<ConnectionState.CLOSED: 3>, <ConnectionInputs.RECV_DATA: 11>)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 148, in handle_async_request
status, headers = await self._receive_response(
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 292, in _receive_response
event = await self._receive_stream_event(request, stream_id)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 333, in _receive_stream_event
await self._receive_events(request, stream_id)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 361, in _receive_events
events = await self._read_incoming_data(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 454, in _read_incoming_data
events: typing.List[h2.events.Event] = self._h2_state.receive_data(data)
File "/usr/local/lib/python3.9/site-packages/h2/connection.py", line 1463, in receive_data
events.extend(self._receive_frame(frame))
File "/usr/local/lib/python3.9/site-packages/h2/connection.py", line 1487, in _receive_frame
frames, events = self._frame_dispatch_table[frame.__class__](frame)
File "/usr/local/lib/python3.9/site-packages/h2/connection.py", line 1673, in _receive_data_frame
events = self.state_machine.process_input(
File "/usr/local/lib/python3.9/site-packages/h2/connection.py", line 228, in process_input
raise ProtocolError(
h2.exceptions.ProtocolError: Invalid input ConnectionInputs.RECV_DATA in state ConnectionState.CLOSED
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/src/model.py", line 169, in generate_text
response = await self.http_client.post(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1848, in post
return await self.request(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1530, in request
return await self.send(request, auth=auth, follow_redirects=follow_redirects)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1617, in send
response = await self._send_handling_auth(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
response = await self._send_handling_redirects(
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
response = await self._send_single_request(request)
File "/usr/local/lib/python3.9/site-packages/httpx/_client.py", line 1719, in _send_single_request
response = await transport.handle_async_request(request)
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request
raise exc
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 96, in handle_async_request
return await self._connection.handle_async_request(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/http2.py", line 167, in handle_async_request
await self._response_closed(stream_id=stream_id)
File "/usr/local/lib/python3.9/site-packages/anyio/_core/_synchronization.py", line 143, in acquire
await cancel_shielded_checkpoint()
File "/usr/local/lib/python3.9/site-packages/anyio/lowlevel.py", line 61, in cancel_shielded_checkpoint
await get_asynclib().cancel_shielded_checkpoint()
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 471, in cancel_shielded_checkpoint
await sleep(0)
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 641, in sleep
await __sleep0()
File "/usr/local/lib/python3.9/asyncio/tasks.py", line 630, in __sleep0
yield
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 50, in __call__
result = await fn(*args, **kwargs)
File "/app/src/model.py", line 194, in generate_text
except openai.OpenAIException as excinfo:
AttributeError: module 'openai' has no attribute 'OpenAIException'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 88, in async_wrapped
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/tenacity/_asyncio.py", line 47, in __call__
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.9/site-packages/tenacity/__init__.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x550521aac0 state=finished raised AttributeError>]
INFO README-AI execution complete. |
Just made one more update - try once more to re-pull the 0.0.4 image. |
@AhmedMohammedMostafa With the latest docker image I was able to generate this readme.md for your example repository: readme.md
◦ Discover the unknown with Reverse-Image-Search!◦ Developed with the software and tools listed below.📒 Table of Contents
📍 OverviewThe project is a Reverse Image Search application built using Express.js, Weaviate, and React. Its core functionalities include allowing users to upload images, search for similar images, and view a gallery of all uploaded images. The app utilizes Weaviate, a GraphQL-based search engine, to perform image searches, and provides a user-friendly interface using React and the Ant Design library. By offering reverse image search capabilities, the application provides a valuable tool for users to identify and find related images quickly and efficiently. ⚙️ Features
📂 Project Structurerepo
├── README.md
├── api
│ ├── index.js
│ ├── package-lock.json
│ ├── package.json
│ ├── routes
│ │ ├── search.js
│ │ ├── stored-images.js
│ │ └── upload.js
│ └── weaviate.js
└── client
├── README.md
├── components
│ ├── Images.jsx
│ ├── SearchTab.jsx
│ └── UploadTab.jsx
├── docker-compose.yml
├── jsconfig.json
├── next.config.js
├── package-lock.json
├── package.json
├── pages
│ ├── _app.js
│ ├── _document.js
│ ├── api
│ │ └── hello.js
│ └── index.js
├── public
│ ├── favicon.ico
│ ├── next.svg
│ └── vercel.svg
└── styles
└── globals.css
9 directories, 25 files 🧩 ModulesApi
Routes
Client
Styles
Components
Pages
🚀 Getting Started✔️ PrerequisitesBefore you begin, ensure that you have the following prerequisites installed:
📦 Installation
git clone https://github.com/AhmedMohammedMostafa/Reverse-Image-Search
cd Reverse-Image-Search
npm install 🎮 Using Reverse-Image-Searchnode app.js 🧪 Running Testsnpm test 🗺 Roadmap
🤝 ContributingContributions are always welcome! Please follow these steps:
git checkout -b new-feature-branch
git commit -m 'Implemented new feature.'
git push origin new-feature-branch
📄 LicenseThis project is licensed under the 👏 Acknowledgments
|
when using this
when using the pwd one it makes an error
|
@AhmedMohammedMostafa Just updated the image to work with multiple platforms. Try the following: docker pull zeroxeli/readme-ai:latest
docker run -it \
-e OPENAI_API_KEY="YOUR_API_KEY" \
-v "$(pwd)":/app zeroxeli/readme-ai:latest \
readmeai -o readme-ai.md -r https://github.com/eli64s/readme-ai |
Error and when using docker to pull, it finishes but when running the python command it says
The text was updated successfully, but these errors were encountered: